diff options
author | John Garry <john.g.garry@oracle.com> | 2025-07-24 08:12:14 +0000 |
---|---|---|
committer | Carlos Maiolino <cem@kernel.org> | 2025-08-11 14:03:44 +0200 |
commit | 68456d05eb57a5d16b4be2d3caf421bdcf2de72e (patch) | |
tree | 0248d35481b00ae9d19b1d7492affa8cd7df41cd /scripts/lib | |
parent | e7fb9b71326f43bab25fb8f18c6bfebd7a628696 (diff) |
xfs: disallow atomic writes on DAX
Atomic writes are not currently supported for DAX, but two problems exist:
- we may go down DAX write path for IOCB_ATOMIC, which does not handle
IOCB_ATOMIC properly
- we report non-zero atomic write limits in statx (for DAX inodes)
We may want atomic writes support on DAX in future, but just disallow for
now.
For this, ensure when IOCB_ATOMIC is set that we check the write size
versus the atomic write min and max before branching off to the DAX write
path. This is not strictly required for DAX, as we should not get this far
in the write path as FMODE_CAN_ATOMIC_WRITE should not be set.
In addition, due to reflink being supported for DAX, we automatically get
CoW-based atomic writes support being advertised. Remedy this by
disallowing atomic writes for a DAX inode for both sw and hw modes.
Reported-by: Darrick J. Wong <djwong@kernel.org>
Fixes: 9dffc58f2384 ("xfs: update atomic write limits")
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'scripts/lib')
0 files changed, 0 insertions, 0 deletions