NVDIMM Device and Persistent Memory development
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: "Verma, Vishal L" <vishal.l.verma@intel.com>
Cc: "Williams, Dan J" <dan.j.williams@intel.com>,
	"Jiang, Dave" <dave.jiang@intel.com>,
	"kbusch@meta.com" <kbusch@meta.com>,
	"nvdimm@lists.linux.dev" <nvdimm@lists.linux.dev>
Subject: Re: [PATCH] btt: fix block integrity
Date: Fri, 15 Nov 2024 08:19:03 -0700	[thread overview]
Message-ID: <ZzdmZ6U3x8S2HLxX@kbusch-mbp> (raw)
In-Reply-To: <eb557451f28668a7c8877322a5d5cb954fb6ac32.camel@intel.com>

On Thu, Nov 14, 2024 at 09:33:05PM +0000, Verma, Vishal L wrote:
> I suspect this isn't actually needed, since the btt never generated its
> own protection payload. See the /* Already protected? */ case in
> bio_integrity_prep() - I think that's the only case we were trying to
> account for - i.e. 'some other layer' set the integrity payload, and
> we're just passing it on to it's right spot in pmem, and reading it
> back. The btt itself doesn't ever try to generate and set a protection
> payload of its own.
> 
> If you look at the original flow in
> 41cd8b70c37ace40077c8d6ec0b74b983178c192, btt never actually wants to
> call bio_integrity_prep and allocate the bip - if it has to do that,
> that's treated as an error.
> 
> Since some of the reworks then to eliminate bio_integrity_enabled, and
> other block level changes, this has changed to actually allocating bip
> and continuing instead of erroring, but coincidentially since we assign
> bip before the allocation (i.e. NULL as you point out), any future
> steps nicely ignore it, but if it was set by another subsystem, things
> should still 'work' - as in bio_integrity_prep() would return true, and
> bip would be non-NULL, and would get written/read as needed, and this
> is the happy path.
> 
> Does this makes sense or am I missing something?

One of us might be missing something. :)

The only upper layers I find that pass an integrity payload to the lower
level driver are the scsi and nvme targets. It may make sense to use btt
as the backend for those, but is that the only use case this was trying
to enable? Or is there some other path I didn't find?

  reply	other threads:[~2024-11-15 15:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-30 20:42 [PATCH] btt: fix block integrity Keith Busch
2024-09-03 15:47 ` Dave Jiang
2024-11-13 19:03 ` Ira Weiny
2024-11-13 19:21   ` Keith Busch
2024-11-13 21:28     ` Dan Williams
2024-11-13 21:50       ` Jeff Moyer
2024-11-13 22:06         ` Dan Williams
2024-11-14  4:22           ` Christoph Hellwig
2024-11-14 21:33 ` Verma, Vishal L
2024-11-15 15:19   ` Keith Busch [this message]
2024-11-15 17:58     ` Verma, Vishal L

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=ZzdmZ6U3x8S2HLxX@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=kbusch@meta.com \
    --cc=nvdimm@lists.linux.dev \
    --cc=vishal.l.verma@intel.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