Skip to content

fio: atomic write support

John Garry fio 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 1 replyApplied
  2. v1 RFC4 patches 13 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/9os-linux: Define RWF_ATOMICos/os-linux.h+4 -00 replies
2/9os: Reintroduce atomic write supportinit.c ioengines.h options.c +1 more+16 -00 replies
3/9pvsync2: Support RWF_ATOMICengines/sync.c+6 -30 replies
4/9libaio: Support RWF_ATOMICengines/libaio.c+6 -10 replies
5/9io_uring: Support RWF_ATOMICengines/io_uring.c+4 -10 replies
6/9tools/fiograph: Update for atomic supporttools/fiograph/fiograph.conf+3 -30 replies
7/9doc: Document atomic commandHOWTO.rst fio.1+27 -00 replies
8/9fio: Support verify_write_sequenceHOWTO.rst fio.1 init.c +3 more+38 -30 replies
9/9examples: Add example for atomic write verifyexamples/atomic-verify.fio+36 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/9] fio: atomic write support

This series re-introduces atomic write support.

Some time ago support was added for O_ATOMIC in fio, but O_ATOMIC support never made it into the linux kernel, so fio support was dropped. However some plumbing was left behind; specifically, we can still pass command line arg --atomic=1, which sets thread option oatomic, but that is just ignored.

Linux v6.11-rc added initial atomic write support through RWF_ATOMIC flag. See latest man pages for details of RWF_ATOMIC:
https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/

This series uses the "atomic" command line option to set RWF_ATOMIC on a per IO.

Support is added for libaio, pvsync2, and io_uring ioengines.

Since RWF_ATOMIC is only relevant to those ioengines mentioned, trying to set --atomic=1 for other ioengines now errors.

The verify feature can be useful to prove atomic writes. However, atomic writes only ensure a proper CRC, but not sequence number. So a new option to ignore sequence numbers is added.

Compile tested only for Linux (ok?)

Differences to RFC:
- Drop patch to ignore verify sequence number
- Add support for new option verify_sequence_number
- Add atomic writes fio file example
- Update documentation for atomic option

Alan Adamson (1):
pvsync2: Support RWF_ATOMIC

John Garry (8):
os-linux: Define RWF_ATOMIC
os: Reintroduce atomic write support
libaio: Support RWF_ATOMIC
io_uring: Support RWF_ATOMIC
tools/fiograph: Update for atomic support
doc: Document atomic command
fio: Support verify_write_sequence
examples: Add example for atomic write verify

 HOWTO.rst                    | 25 +++++++++++++++++++++++++
 engines/io_uring.c           |  5 ++++-
 engines/libaio.c             |  7 ++++++-
 engines/sync.c               |  9 ++++++---
 examples/atomic-verify.fio   | 36 ++++++++++++++++++++++++++++++++++++
 fio.1                        | 21 +++++++++++++++++++++
 init.c                       | 14 ++++++++++++++
 ioengines.h                  |  2 ++
 options.c                    | 13 +++++++++++++
 os/os-linux.h                |  5 +++++
 thread_options.h             |  1 +
 tools/fiograph/fiograph.conf |  6 +++---
 verify.c                     |  7 ++++---
 13 files changed, 140 insertions(+), 11 deletions(-)
 create mode 100644 examples/atomic-verify.fio
Signature · 1 line
2.31.1