]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: Allow parallel DIO reads
authorJan Kara <jack@suse.cz>
Fri, 30 Sep 2016 05:03:17 +0000 (01:03 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 30 Sep 2016 05:03:17 +0000 (01:03 -0400)
commit504be949949d606547c151c4becbef68c1a92bf0
tree9c8b9ce94df5b69a6c1befcc735f9ba665b6cba2
parent677d90cb5fad69e5301c8fccd156fbd435cc910d
ext4: Allow parallel DIO reads

We can easily support parallel direct IO reads. We only have to make
sure we cannot expose uninitialized data by reading allocated block to
which data was not written yet, or which was already truncated. That is
easily achieved by holding inode_lock in shared mode - that excludes all
writes, truncates, hole punches. We also have to guard against page
writeback allocating blocks for delay-allocated pages - that race is
handled by the fact that we writeback all the pages in the affected
range and the lock protects us from new pages being created there.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inode.c