Re: [PATCH 6/6] ext4: update EOFBLOCKS flag on fallocate properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2011-10-20, at 3:08 PM, Dmitry Monakhov wrote:
> EOFBLOCK_FL should be updated if called w/o FALLOCATE_FL_KEEP_SIZE
> Currently it happens only if new extent was allocated
> Last fallocate cmd has updated size, but kept EOFBLOCK_FL set. And fsck
> will complain about that.
> 
> Also remove ping pong in ext4_fallocate() in case of new extents, where
> ext4_ext_map_blocks() clear EOFBLOCKS bit, and later
> ext4_falloc_update_inode() restore it again.

Looking into this code, I see some strange behaviour that you added in
an earlier commit (21ca087a3q) to both ext4_ext_convert_to_initialized()
and ext4_split_unwritten_extents(), but I'm trying to figure out if it
is actually needed today.

>    ext4: Do not zero out uninitialized extents beyond i_size
> 
>    The extents code will sometimes zero out blocks and mark them as
>    initialized instead of splitting an extent into several smaller ones.
>    This optimization however, causes problems if the extent is beyond
>    i_size because fsck will complain if there are uninitialized blocks

Should this be "... if there are initialized blocks after i_size"?

>    after i_size as this can not be distinguished from an inode that has
>    an incorrect i_size field.

Shouldn't it be possible to just mark the file with EXT4_EOFBLOCK_FL
so that the whole extent can be zeroed out and avoid the overhead of
splitting the extent and having to zero out the blocks beyond EOF on
the next file IO?

Cheers, Andreas
--
Andreas Dilger 
Principal Engineer
Whamcloud, Inc.






Cheers, Andreas





--
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


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux