From: John Garry <john.g.garry@oracle.com>
To: Jens Axboe <axboe@kernel.dk>, fio@vger.kernel.org
Cc: martin.petersen@oracle.com, djwong@kernel.org, mcgrof@kernel.org,
david@fromorbit.com
Subject: Re: [PATCH 0/7] fio: atomic write support
Date: Tue, 10 Sep 2024 11:03:49 +0100 [thread overview]
Message-ID: <7255db3d-abb5-4371-9cb1-e12cf41f979c@oracle.com> (raw)
In-Reply-To: <f689c9ea-b677-4521-8363-1c4f2f3c81f0@kernel.dk>
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
next prev parent reply other threads:[~2024-09-10 10:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 12:31 [PATCH 0/7] fio: atomic write support John Garry
2024-08-29 12:31 ` [PATCH 1/7] os-linux: Renumber RWF_UNCACHED John Garry
2024-08-29 13:16 ` Jens Axboe
2024-08-29 12:31 ` [PATCH 2/7] os-linux: Define RWF_ATOMIC John Garry
2024-08-29 12:31 ` [PATCH 3/7] os: Reintroduce atomic write support John Garry
2024-08-29 12:31 ` [PATCH 4/7] verify: Ignore sequence number errors for atomic writes John Garry
2024-08-29 12:31 ` [PATCH 5/7] pvsync2: Support RWF_ATOMIC John Garry
2024-08-29 12:31 ` [PATCH 6/7] libaio: " John Garry
2024-08-29 12:31 ` [PATCH 7/7] io_uring: " John Garry
2024-09-05 9:37 ` [PATCH 0/7] fio: atomic write support Luis Chamberlain
2024-09-06 15:22 ` John Garry
2024-09-06 23:29 ` Luis Chamberlain
2024-09-09 8:12 ` John Garry
2024-09-09 19:48 ` Jens Axboe
2024-09-09 20:20 ` John Garry
2024-09-09 21:03 ` Luis Chamberlain
2024-09-09 19:53 ` Jens Axboe
2024-09-09 20:28 ` John Garry
2024-09-10 1:01 ` Jens Axboe
2024-09-10 10:03 ` John Garry [this message]
2024-09-10 15:56 ` Jens Axboe
2024-09-10 16:38 ` John Garry
2024-09-10 16:56 ` Jens Axboe
2024-09-10 17:17 ` John Garry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7255db3d-abb5-4371-9cb1-e12cf41f979c@oracle.com \
--to=john.g.garry@oracle.com \
--cc=axboe@kernel.dk \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=fio@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mcgrof@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.