Junxiao Bi c7d2cbc364 ocfs2: update inode size after zeroing 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>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-02-10 16:01:43 -08:00
..
2014-01-21 16:19:41 -08:00
2013-05-07 20:16:25 -07:00
2010-09-10 09:18:15 -07:00
2013-06-29 12:57:02 +04:00
2011-07-25 14:58:15 -07:00
2013-11-09 00:16:32 -05:00
2013-05-07 20:16:25 -07:00
2011-02-21 11:18:23 +08:00
2008-10-13 13:57:57 -07:00
2014-01-21 16:19:41 -08:00
2013-02-26 02:46:10 -05:00
2008-02-03 17:33:42 +02:00
2011-03-31 11:26:23 -03:00
2011-07-24 10:34:54 -07:00
2012-05-29 23:28:40 -04:00
2011-02-24 16:22:20 +08:00