Skip to content

statx: Add regression test for STATX_WRITE_ATOMIC on regular files

Gaurav Pathak ltp 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v8 Latest1 patch 0 repliesNew

Changes in v8 from the cover letter · 20 lines

- 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/[email protected]

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1statx: Add regression test for STATX_WRITE_ATOMIC on regular files+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.

Read the v8 thread

Cover letter [LTP] [PATCH v8 0/1] statx: Add regression test for STATX_WRITE_ATOMIC on regular files

From: Gaurav Pathak <[email protected]>

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/[email protected]

Gaurav Pathak (1):
statx: Add regression test for STATX_WRITE_ATOMIC on regular files

Signature · 5 lines
2.51.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp