ext4: serialize dio nonlocked reads with defrag workers
authorDmitry Monakhov <dmonakhov@openvz.org>
Sat, 29 Sep 2012 04:41:21 +0000 (00:41 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 29 Sep 2012 04:41:21 +0000 (00:41 -0400)
commit17335dcc471199717839b2fa3492ca36f70f1168
tree5f39f51868f60f8be94ca7e811d34bba443ef288
parent28a535f9a0df060569dcc786e5bc2e1de43d7dc7
ext4: serialize dio nonlocked reads with defrag workers

Inode's block defrag and ext4_change_inode_journal_flag() may
affect nonlocked DIO reads result, so proper synchronization
required.

- Add missed inode_dio_wait() calls where appropriate
- Check inode state under extra i_dio_count reference.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/indirect.c
fs/ext4/inode.c
fs/ext4/move_extent.c