Re: [PATCH 0/7] fio: atomic write support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/09/2024 02:01, Jens Axboe wrote:

+ Dave, who might be interested in this

I was preparing a v2 the same as this, but do you think that I should
just add a new verify option for atomic writes to ignore the header?
Or is just saying "you have selected atomic=1, so I'll just ignore the
header for you" ok?
I'm still not following why atomic writes make this any different. They
should not. If you have multiple writers writing the same blocks, yeah
you will get verification errors. This is true for any kind of write, be
it buffered, dio, or atomic. So unless I'm missing something here, I'd
just drop that patch.

Some background is that main selling point of atomic writes is that we guarantee writes to storage will not be torn for a power failure or kernel crash.

Another aspect of atomic writes is that they handle racing writes and reads, such that a read racing with a write will see all the data from the write or none. Well, SCSI and NVMe guarantee this if using RWF_ATOMIC, but it is not formally stated as a feature of RWF_ATOMIC.

It can be argued that having racing reads and writes is an application bug. Furthermore, as I understand, even if posix guarantees that regular writes are "atomic", it is not the case generally.

So one part of the relevance of atomic writes to fio verify is that we can verify that atomic writes "safely" handle racing read and writes. For this, the CRC checks would be successful if we have many jobs; however header sequence numbers are not. Hence patch 4/7.

I had also been using the verify feature to test atomic writes for power failures. In this case, I run a single verify job with --rw=write, power fail, and use verify in read mode to prove no invalid data in the file, like:

fio --filename=mnt/file --direct=1 --rw=read --bs=8k --iodepth=100 --na
me=iops --numjobs=1 --loops=1 --verify=crc64 --ioengine=libaio
--verify_fatal=1 --group_reporting  --exitall_on_error

This power fail test is what I am mostly interested in.

So my point is that the patch to ignore invalid headers could be dropped, but let me know your thoughts.

Thanks,
John




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux