Whamcloud - gitweb
e2fsck: Fix directory i_size handling
authorTheodore Ts'o <tytso@mit.edu>
Thu, 13 Mar 2008 04:58:54 +0000 (00:58 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 13 Mar 2008 04:58:54 +0000 (00:58 -0400)
commit2cd12338395fda301826a88ec7005f4362cc756e
tree2f3240c7730c830693f4e51b2ca5ce1d507dca8e
parent52b1dd5e496c199e9cbcc238f26fd2264a07a2cf
e2fsck: Fix directory i_size handling

If a directory's i_size is bigger than the number of blocks, don't try
to allocate extra empty blocks to the end of the directory; there's no
real point to do that.  Also, if a directory's i_size is not a
multiple of the blocksize, flag that as a mistake so it can be fixed.

This more elegantly addresses the problem which was found on Bas van
Schaik's filesystem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/pass1.c
tests/f_holedir/expect.1
tests/f_holedir/expect.2