]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ext4: update direct I/O read lock pattern for IOCB_NOWAIT
authorMatthew Bobrowski <mbobrowski@mbobrowski.org>
Tue, 5 Nov 2019 11:59:22 +0000 (22:59 +1100)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 6 Jan 2020 16:03:52 +0000 (10:03 -0600)
commitfa63e0ba6c779e1301f9c7459c3c36409219286d
tree08e21c44f15a30167f87ed53d255c6af7cd37ff0
parent2ba03841f4cdd07fef80dd357cb085a5e1309a9c
ext4: update direct I/O read lock pattern for IOCB_NOWAIT

BugLink: https://bugs.launchpad.net/bugs/1858429
[ Upstream commit 548feebec7e93e58b647dba70b3303dcb569c914 ]

This patch updates the lock pattern in ext4_direct_IO_read() to not
block on inode lock in cases of IOCB_NOWAIT direct I/O reads. The
locking condition implemented here is similar to that of 942491c9e6d6
("xfs: fix AIM7 regression").

Fixes: 16c54688592c ("ext4: Allow parallel DIO reads")
Signed-off-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/c5d5e759f91747359fbd2c6f9a36240cf75ad79f.1572949325.git.mbobrowski@mbobrowski.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/ext4/inode.c