From: Mike Snitzer <snitzer@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: dm-devel@redhat.com, "Alasdair G. Kergon" <agk@redhat.com>
Subject: Re: fix nvme test
Date: Mon, 26 Feb 2018 15:50:40 -0500 [thread overview]
Message-ID: <20180226205039.GA13722@redhat.com> (raw)
In-Reply-To: <alpine.LRH.2.02.1802261522141.5096@file01.intranet.prod.int.rdu2.redhat.com>
On Mon, Feb 26 2018 at 3:22pm -0500,
Mikulas Patocka <mpatocka@redhat.com> wrote:
> Hi
>
> The strncmp function should compare 4 bytes.
Ah yeap, thanks.
> But I'm wondering what's the purpose of this test at all? bio-based
> interface doesn't support partial completions for any device - so why do
> we need special code path just for nvme?
request-based does support partial completions, it is the underlying
devices that matter here, not the upper layer DM device type.
The rationale for this atomic operation requirement is mainly historic:
previously DM_TYPE_NVME_BIO_BASED was (ab)using blk_steal_bios() to
retry a request that failed with a retryable error (as part of a hook
that never was allowed to be introduced to the NVMe request completion
code-path). For that model it was important that the underlying device
not partially complete its request; because on retry all of the bios
were getting stolen from the request and resubmitted in their entirety
back to the upper layer bio-based device (multipath in my historic
case).
Now that DM_TYPE_NVME_BIO_BASED isn't making use of blk_steal_bios() we
_could_ relax this constraint but I'd prefer to have the option of
using blk_steal_bios() in the future.
> and why can't we use it for other block devices?
I'm not exactly sure about what you mean by "it" but I'll assume you
mean: why can't we use direct_make_request() for other devices? I've
purposely constrained DM_TYPE_NVME_BIO_BASED to mean we have a target
that is an immutable singleton that is only layered on an NVMe device.
I know this case to currently be uniquely suited for use with
direct_make_request(): no splitting can occur and no partial completion
is used by the underlying driver (the latter less important than the
former).
Mike
prev parent reply other threads:[~2018-02-26 20:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 20:22 [PATCH] fix nvme test Mikulas Patocka
2018-02-26 20:50 ` Mike Snitzer [this message]
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=20180226205039.GA13722@redhat.com \
--to=snitzer@redhat.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--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