Am Fr., 20. Aug. 2021 um 15:49 Uhr schrieb Steven Whitehouse <swhiteho@xxxxxxxxxx>: > We always used to manage to avoid holding fs locks when copying to/from userspace > to avoid these complications. I realize the intent, but that goal has never actually been achieved. Direct I/O has *always* been calling get_user_pages() while holding the inode glock in deferred mode. The situation is slightly different for buffered I/O, but we have the same problem there at least since switching to iomap. (And it's a fundamental property of iomap that we want to hold the inode glock across multi-page mappings, not an implementation deficit.) Here's a slightly outdated version of a test case that makes all versions of gfs2 prior to this patch queue unhappy: https://lore.kernel.org/fstests/20210531152604.240462-1-agruenba@xxxxxxxxxx/ Thanks, Andreas