ext4: use transaction reservation for extent conversion in ext4_end_io
authorJan Kara <jack@suse.cz>
Tue, 4 Jun 2013 17:21:11 +0000 (13:21 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 4 Jun 2013 17:21:11 +0000 (13:21 -0400)
commit6b523df4fb5ae281ddbc817f40504b33e6226554
treef129ccf336689296ff21e34ed86712b25d437a65
parent3613d22807a2616e9346800bacd88aa8bbbefcd7
ext4: use transaction reservation for extent conversion in ext4_end_io

Later we would like to clear PageWriteback bit only after extent
conversion from unwritten to written extents is performed.  However it
is not possible to start a transaction after PageWriteback is set
because that violates lock ordering (and is easy to deadlock).  So we
have to reserve a transaction before locking pages and sending them
for IO and later we use the transaction for extent conversion from
ext4_end_io().

Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/ext4_jbd2.h
fs/ext4/extents.c
fs/ext4/inode.c
fs/ext4/page-io.c