]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ocfs2: update inode size after zeronig the hole
authorJunxiao Bi <junxiao.bi@oracle.com>
Thu, 18 Jul 2013 23:56:36 +0000 (09:56 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 18 Jul 2013 23:56:36 +0000 (09:56 +1000)
commit11dd1fb9e5ffb68fa4df17f37de18ce43513f9b6
tree11b5e29c252ecf59902e7c67cd75dc459e03bf2b
parent494b69170120b75e19a218b20e5f80ee11b18ff5
ocfs2: update inode size after zeronig the hole

fs-writeback will release the dirty pages without page lock whose offset
are over inode size, the release happens at block_write_full_page_endio().
 If not update, dirty pages in file holes may be released before flushed
to the disk, then file holes will contain some non-zero data, this will
cause sparse file md5sum error.

To reproduce the bug, find a big sparse file with many holes, like vm
image file, its actual size should be bigger than available mem size to
make writeback work more frequently, tar it with -S option, then keep
untar it and check its md5sum again and again until you get a wrong
md5sum.

Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Younger Liu <younger.liu@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/file.c