From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Clay Mayers <Clay.Mayers@kioxia.com>
Cc: Keith Busch <kbusch@kernel.org>, Hannes Reinecke <hare@suse.de>,
Matthew Wilcox <willy@infradead.org>,
Chaitanya Kulkarni <chaitanyak@nvidia.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"axboe@kernel.dk" <axboe@kernel.dk>,
"djwong@kernel.org" <djwong@kernel.org>,
"hch@lst.de" <hch@lst.de>, "sagi@grimberg.me" <sagi@grimberg.me>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"javier@javigon.com" <javier@javigon.com>,
"johannes.thumshirn@wdc.com" <johannes.thumshirn@wdc.com>,
"bvanassche@acm.org" <bvanassche@acm.org>,
"dongli.zhang@oracle.com" <dongli.zhang@oracle.com>,
"jefflexu@linux.alibaba.com" <jefflexu@linux.alibaba.com>,
"josef@toxicpanda.com" <josef@toxicpanda.com>,
"clm@fb.com" <clm@fb.com>, "dsterba@suse.com" <dsterba@suse.com>,
"jack@suse.com" <jack@suse.com>, "tytso@mit.edu" <tytso@mit.edu>,
"adilger.kernel@dilger.ca" <adilger.kernel@dilger.ca>,
"jlayton@kernel.org" <jlayton@kernel.org>,
"idryomov@gmail.com" <idryomov@gmail.com>,
"danil.kipnis@cloud.ionos.com" <danil.kipnis@cloud.ionos.com>,
"ebiggers@google.com" <ebiggers@google.com>,
"jinpu.wang@cloud.ionos.com" <jinpu.wang@cloud.ionos.com>
Subject: Re: [PATCH 0/6] block: add support for REQ_OP_VERIFY
Date: Thu, 08 Dec 2022 23:52:01 -0500 [thread overview]
Message-ID: <yq14ju5gvfh.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <f68009b7cc744c02ad69d68fd7e61751@kioxia.com> (Clay Mayers's message of "Fri, 2 Dec 2022 17:33:33 +0000")
> My guess, if true, is it's rationalized with the device is already
> doing patrols in the background - why verify when it's already
> been recently patrolled?
The original SCSI VERIFY operation allowed RAID array firmware to do
background scrubs before disk drives developed anything resembling
sophisticated media management. If verification of a block failed, the
array firmware could go ahead and reconstruct the data from the rest of
the stripe in the background. This substantially reduced the risk of
having to perform block reconstruction in the hot path. And verification
did not have to burden the already slow array CPU/memory/DMA combo with
transferring every block on every attached drive.
I suspect that these days it is very hard to find a storage device that
doesn't do media management internally in the background. So from the
perspective of physically exercising the media, VERIFY is probably not
terribly useful anymore.
In that light, having to run VERIFY over the full block range of a
device to identify unreadable blocks seems like a fairly clunky
mechanism. Querying the device for a list of unrecoverable blocks
already identified by the firmware seems like a better interface.
I am not sure I understand this whole "proof that the drive did
something" requirement. If a device lies and implements VERIFY as a noop
it just means you'll get the error during a future READ operation
instead.
No matter what, a successful VERIFY is obviously no guarantee that a
future READ on a given block will be possible. But it doesn't matter
because the useful outcome of a verify operation is the failure, not the
success. It's the verification failure scenario which allows you to take
a corrective action.
If you really want to verify device VERIFY implementation, we do have
WRITE UNCORRECTABLE commands in both SCSI and NVMe which allow you to do
that. But I think device validation is a secondary issue. The more
pertinent question is whether we have use cases in the kernel (MD,
btrfs) which would benefit from being able to preemptively identify
unreadable blocks?
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2022-12-09 4:53 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 9:14 [PATCH 0/6] block: add support for REQ_OP_VERIFY Chaitanya Kulkarni
2022-06-30 9:14 ` [PATCH 1/6] " Chaitanya Kulkarni
2022-06-30 16:18 ` Darrick J. Wong
2022-07-05 16:50 ` Chaitanya Kulkarni
2022-07-05 17:57 ` Darrick J. Wong
2022-07-06 1:32 ` Chaitanya Kulkarni
2022-07-05 8:34 ` Christoph Hellwig
2022-07-05 23:55 ` Chaitanya Kulkarni
2022-06-30 9:14 ` [PATCH 2/6] nvme: add support for the Verify command Chaitanya Kulkarni
2022-06-30 16:24 ` Keith Busch
2022-07-05 8:34 ` Christoph Hellwig
2022-07-05 23:56 ` Chaitanya Kulkarni
2022-06-30 9:14 ` [PATCH 3/6] nvmet: add Verify command support for bdev-ns Chaitanya Kulkarni
2022-06-30 9:14 ` [PATCH 4/6] nvmet: add Verify emulation " Chaitanya Kulkarni
2022-07-05 8:35 ` Christoph Hellwig
2022-07-06 0:00 ` Chaitanya Kulkarni
2022-06-30 9:14 ` [PATCH 5/6] nvmet: add verify emulation support for file-ns Chaitanya Kulkarni
2022-07-05 8:36 ` Christoph Hellwig
2022-07-06 0:06 ` Chaitanya Kulkarni
2022-06-30 9:14 ` [PATCH 6/6] null_blk: add REQ_OP_VERIFY support Chaitanya Kulkarni
2022-07-05 8:38 ` [PATCH 0/6] block: add support for REQ_OP_VERIFY Christoph Hellwig
2022-07-05 16:47 ` Chaitanya Kulkarni
2022-07-06 17:42 ` Matthew Wilcox
2022-07-13 9:14 ` Chaitanya Kulkarni
2022-07-13 9:36 ` Johannes Thumshirn
2022-07-13 12:17 ` Matthew Wilcox
2022-07-13 14:04 ` Keith Busch
2022-12-01 18:12 ` Chaitanya Kulkarni
2022-12-01 19:39 ` Matthew Wilcox
2022-12-02 7:16 ` Hannes Reinecke
2022-12-02 14:58 ` Keith Busch
2022-12-02 17:33 ` Clay Mayers
2022-12-02 18:58 ` Keith Busch
2022-12-09 4:52 ` Martin K. Petersen [this message]
2022-12-10 13:06 ` Carlos Carvalho
2022-12-12 6:30 ` hch
2022-12-03 4:19 ` Javier González
2022-12-04 20:29 ` Keith Busch
2022-12-08 20:06 ` Javier González
2022-12-08 20:02 ` Matthew Wilcox
2022-12-02 7:13 ` Hannes Reinecke
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=yq14ju5gvfh.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=Clay.Mayers@kioxia.com \
--cc=adilger.kernel@dilger.ca \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=chaitanyak@nvidia.com \
--cc=clm@fb.com \
--cc=danil.kipnis@cloud.ionos.com \
--cc=djwong@kernel.org \
--cc=dongli.zhang@oracle.com \
--cc=dsterba@suse.com \
--cc=ebiggers@google.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=idryomov@gmail.com \
--cc=jack@suse.com \
--cc=javier@javigon.com \
--cc=jefflexu@linux.alibaba.com \
--cc=jejb@linux.ibm.com \
--cc=jinpu.wang@cloud.ionos.com \
--cc=jlayton@kernel.org \
--cc=johannes.thumshirn@wdc.com \
--cc=josef@toxicpanda.com \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-raid@vger.kernel.org \
--cc=sagi@grimberg.me \
--cc=tytso@mit.edu \
--cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).