Whamcloud - gitweb
e2fsck: do a better job of fixing i_size of inline directories
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 10 Aug 2014 22:44:07 +0000 (18:44 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 10 Aug 2014 22:44:07 +0000 (18:44 -0400)
commitef9c58d572de36f1786d32c93196a679294e3bc7
tree4f6271ec0805ca3498339099ea219ac6a7a5fb01
parentfa441f91f1dc02f7c72694b5d4f65374b5a18f44
e2fsck: do a better job of fixing i_size of inline directories

If we encounter a directory whose i_size != the inline data size, just
set i_size to the size of the inline data.  The pb.last_block
calculation is wrong since pb.last_block == -1, which results in
i_size being set to zero, which corrupts the directory.

Clear the inline_data inode flag if we actually /are/ setting i_size
to zero.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass1.c