[LTP] [PATCH v8 1/1] statx: Add regression test for STATX_WRITE_ATOMIC on regular files
Gaurav Pathak
gpathak@suse.de
Mon Oct 19 12:16:20 CEST 2026
From: Gaurav Pathak <gaurav.pathak@suse.com>
This series adds syscalls/statx13, an LTP test exercising statx(2)'s
STATX_WRITE_ATOMIC reporting on regular files for XFS and ext4.
It covers the hardware-backed atomic write path (shared by both
filesystems, where the underlying block device itself advertises
atomic write support) as well as XFS's newer software/CoW-based
atomic write path (Linux v6.16+), which works even on devices without
hardware atomic write support, such as loop devices.
---
Changes in v8:
- Query the test device's own atomic write capability via statx()
before formatting, instead of assuming fixed mkfs options always apply.
- Derive the XFS/ext4 mkfs block size (and ext4 bigalloc cluster size)
from the device's reported atomic write limits at runtime, capped at
the 64KiB xfsprogs/e2fsprogs ceiling and at the page size unless THP
(xfs) or blocksize_gt_pagesize (ext4) allows larger blocks.
- Add support for XFS's software (CoW/reflink-based) atomic write path
(Linux v6.16+), so the test produces meaningful results on loop
devices too, not just on real or scsi_debug-emulated hardware.
- Keep ext4 on the hardware-only path, since it has no software
fallback; TCONF cleanly when the device lacks atomic write support.
- Switch from .mount_device with static per-filesystem mkfs_opts to
.needs_device + .needs_root with explicit setup()/cleanup(), to
support the new dynamic mkfs/mount logic and TCONF branching.
- Drop the hardcoded xfs-only .min_kver = "6.12" override; gate
behavior on runtime statx() results instead of a fixed kernel
version.
- Expand the file's top comment to document the hardware vs.
software atomic write mechanisms and the block-size constraints
involved.
- Link to v7: https://lore.kernel.org/r/20261016-statx-atomic-write-v7-1-d9cd4e1f1bcd@suse.com
Signed-off-by: Gaurav Pathak <gaurav.pathak@suse.com>
--- b4-submit-tracking ---
# This section is used internally by b4 prep for tracking purposes.
{
"series": {
"revision": 1,
"change-id": "20261019-statx-atomic-write-1919fc099e97",
"prefixes": []
}
}
--
2.51.0
More information about the ltp
mailing list