]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: avoid unnecessarily writing back dirty pages before hole punching
authorLi Wang <liwang@ubuntukylin.com>
Thu, 13 Jun 2013 03:25:45 +0000 (23:25 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 13 Jun 2013 03:25:45 +0000 (23:25 -0400)
commit506f8c9fd7bd9a0fd22152b919a7d1b2c0a1ada9
tree1542c1c9d3cf83f36fcdd7c77010173e586af221
parentc40ae4c163da31409c5f0cb51af511bb11b50782
ext4: avoid unnecessarily writing back dirty pages before hole punching

For hole punching, currently ext4 will synchronously write back the
dirty pages fit into the hole, since the data on the disk responding
to those pages are to be deleted, it is benefical to directly release
those pages, no matter they are dirty or not, except the ordered case.

[ Fixed error return to unlock i_mutex if ext4_begin_ordered_punch_hole()
  fails.  Thanks to Wei Yongjun <yongjun_wei@trendmicro.com.cn> for
  pointing this out.]

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Reviewed-by: Jan Kara <jack@suse.cz>
fs/ext4/inode.c
fs/jbd2/journal.c
fs/jbd2/transaction.c
include/linux/jbd2.h