[PATCH blktests 1/1] common/xfs: verify xfs_io supports statx atomic write attributes
Alan Adamson
alan.adamson at oracle.com
Tue Feb 25 10:31:08 PST 2025
xfs_io atomic write support is a dependency of the scsi and nvme atomic write
tests. The xfs_io atomic write support was introduced across different
versions so if xfs_io pwrite supports the -A (Atomic Write) option, it doesn't
necessarily support statx atomic write fields so that needs to be verified
separately.
Signed-off-by: Alan Adamson <alan.adamson at oracle.com>
---
common/xfs | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/common/xfs b/common/xfs
index 10ecda7c75c8..79e79e7f45ae 100644
--- a/common/xfs
+++ b/common/xfs
@@ -11,6 +11,14 @@ _have_xfs_io_atomic_write() {
_have_program xfs_io || return $?
+ # Determine if the statx command returns the atomic writes fields.
+ s=$(xfs_io -c "statx -r -m 0x00010000" /dev/null | grep atomic_write_unit_min)
+ if [[ $s == "" ]];
+ then
+ SKIP_REASONS+=("xfs_io does not support the statx atomic write fields")
+ return 1
+ fi
+
# If the pwrite command supports the -A option then this version
# of xfs_io supports atomic writes.
s=$(xfs_io -c help | grep pwrite | awk '{ print $4}')
--
2.43.5
More information about the Linux-nvme
mailing list