lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 28 Oct 2011 15:40:08 -0600
From:	Andreas Dilger <adilger@...ger.ca>
To:	Dmitry Monakhov <dmonakhov@...nvz.org>
Cc:	linux-ext4@...r.kernel.org, tytso@....edu,
	achender@...ux.vnet.ibm.com
Subject: Re: [PATCH 6/6] ext4: update EOFBLOCKS flag on fallocate properly

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ