From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Milan Broz <gmazyland@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>,
linux-block@vger.kernel.org, axboe@kernel.dk,
mpatocka@redhat.com, dm-devel@redhat.com,
"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [RFC PATCH] bio-integrity: Fix regression if profile verify_fn is NULL
Date: Wed, 02 Aug 2017 10:11:02 -0400 [thread overview]
Message-ID: <yq1a83injpl.fsf@oracle.com> (raw)
In-Reply-To: <f0eb700b-b2cb-1db8-98cb-f26dfb9e31c3@gmail.com> (Milan Broz's message of "Wed, 2 Aug 2017 15:15:19 +0200")
Milan,
> And the integrity profile is perfect interface for this, we register
> own profile through the proper interface. (Any other solution for
> per-sector metadata would be worse, I tried...)
The DM use case seems a bit weird and I would like to take a closer look
later (a storm took out my power and internet so I'm a bit logistically
impaired right now). But the intent of the integrity infrastructure was
to be able to carry arbitrary metadata pinned to an I/O. The callback
hooks in the profile were really only intended for the case where the
block layer itself needed to generate and verify.
We already do sanity checking on the callback pointers in the prep
function. I guess don't have a problem doing the same in the completion
path.
Fundamentally, though, the verify function should only ever be called if
the profile has BLK_INTEGRITY_VERIFY set.
Previously that was done in the prep function by only adding the verify
endio hook when it was needed. Christoph's patch to kill the double
endio changed that subtly (FWIW, Jens originally objected to having an
integrity conditional in the regular bio completion path. That's why the
verification handling abused the endio function).
Anyway. So I think that the BLK_INTEGRITY_VERIFY logic needs to be
carried over to __bio_integrity_endio()...
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2017-08-02 14:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 12:27 [RFC PATCH] bio-integrity: Fix regression if profile verify_fn is NULL Milan Broz
2017-08-02 12:55 ` Christoph Hellwig
2017-08-02 13:15 ` Milan Broz
2017-08-02 14:11 ` Martin K. Petersen [this message]
2017-08-02 15:24 ` Milan Broz
2017-08-03 14:10 ` [PATCH] bio-integrity: revert "stop abusing bi_end_io" Mikulas Patocka
2017-08-05 13:44 ` Christoph Hellwig
2017-08-05 14:46 ` Mikulas Patocka
2017-08-05 20:25 ` Martin K. Petersen
2017-08-06 18:49 ` Mikulas Patocka
2017-08-07 15:48 ` Martin K. Petersen
2017-08-08 6:47 ` Milan Broz
2017-08-05 20:19 ` Martin K. Petersen
2017-08-09 14:07 ` Christoph Hellwig
2017-08-06 13:30 ` [RFC PATCH] bio-integrity: Fix regression if profile verify_fn is NULL Thorsten Leemhuis
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=yq1a83injpl.fsf@oracle.com \
--to=martin.petersen@oracle.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=gmazyland@gmail.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=mpatocka@redhat.com \
/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).