diff options
author | Junxiao Bi <junxiao.bi@oracle.com> | 2014-02-10 14:25:53 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-02-10 16:01:43 -0800 |
commit | c7d2cbc364b2a237b0ed1bdd7cbf8a24c8a89dfd (patch) | |
tree | 660ee14df70bb80220b2e8c919b66f9f724890ef /fs/ocfs2/slot_map.c | |
parent | d62e74be1270c89fbaf7aada8218bfdf62d00a58 (diff) | |
download | talos-op-linux-c7d2cbc364b2a237b0ed1bdd7cbf8a24c8a89dfd.tar.gz talos-op-linux-c7d2cbc364b2a237b0ed1bdd7cbf8a24c8a89dfd.zip |
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>
Diffstat (limited to 'fs/ocfs2/slot_map.c')
0 files changed, 0 insertions, 0 deletions