On Tue, 2009-07-21 at 15:54 -0600, Andreas Dilger wrote: > That said, we might need to have some kind of flag in the on-disk > inode to indicate that it was preallocated beyond EOF. Otherwise, > e2fsck will try and extend the file size to match the block count, > which isn't correct. We could also use this flag to determine if > truncate needs to be run on the inode even if the new size is the > same. As it happens there's already a flag, FS_FALLOC_FL, set by ext2 in fallocate(). Unfortunately ext4 is using that bit (0x00040000) for EXT4_HUGE_FILE_FL. (Ext4 is using another bit as well, 0x00100000, for EXT4_EXT_MIGRATE_FL when fs.h defines it as FS_DIRECTIO_FL.) I really want to use the FS_FALLOC_FL bit for this purpose but that means reallocating HUGE_FILE_FL to some other big. Objections? -- Frank Mayhar <fmayhar@xxxxxxxxxx> Google, Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html