Linus Torvalds writes: (Summary) wrote:
Note that the "XFS and directio" was only an example. In particular, the VFS layer used to do the locking for the filesystems, to guarantee the POSIX requirements (POSIX requires that writes be seen atomically).
that writes be seen atomically).
But that lock was pushed down into the filesystems, since some filesystems really wanted to have parallel writes (particularly for direct IO, where that POSIX serialization requirement doesn't exist). New filesystems are likely to have copied the pattern from old ones, but even then..
copied the pattern from old ones, but even then..
Also, it's worth noting that "inode->i_rwlock" isn't even well-defined as a lock.
[...]
the direct IO is denied.Note that the "XFS and directio" was only an example. In particular, the VFS layer used to do the locking for the filesystems, to guarantee the POSIX requirements (POSIX requires that writes be seen atomically).
that writes be seen atomically).
But that lock was pushed down into the filesystems, since some filesystems really wanted to have parallel writes (particularly for direct IO, where that POSIX serialization requirement doesn't exist). New filesystems are likely to have copied the pattern from old ones, but even then..
copied the pattern from old ones, but even then..
Also, it's worth noting that "inode->i_rwlock" isn't even well-defined as a lock.