public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Dongyang Li <dongyangli@ddn.com>
To: "joshi.k@samsung.com" <joshi.k@samsung.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "hch@lst.de" <hch@lst.de>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"josef@toxicpanda.com" <josef@toxicpanda.com>,
	"lsf-pc@lists.linux-foundation.org"
	<lsf-pc@lists.linux-foundation.org>,
	"kbusch@kernel.org" <kbusch@kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [Lsf-pc] [LSF/MM/BPF ATTEND][LSF/MM/BPF TOPIC] Meta/Integrity/PI improvements
Date: Wed, 3 Apr 2024 12:40:07 +0000	[thread overview]
Message-ID: <d442fe43e7b43d9e00c168f91dcfddd5a240b366.camel@ddn.com> (raw)
In-Reply-To: <0c54aed5-c1f1-ef83-9da9-626fdf399731@samsung.com>

On Tue, 2024-04-02 at 22:22 +0530, Kanchan Joshi wrote:
> On 4/2/2024 4:15 PM, Dongyang Li wrote:
> > Martin, Kanchan,
> > > 
> > > Kanchan,
> > > 
> > > > - Generic user interface that user-space can use to exchange
> > > > meta.
> > > > A
> > > > new io_uring opcode IORING_OP_READ/WRITE_META - seems feasible
> > > > for
> > > > direct IO.
> > > 
> > > Yep. I'm interested in this too. Reviving this effort is near the
> > > top
> > > of
> > > my todo list so I'm happy to collaborate.
> > If we are going to have a interface to exchange meta/integrity to
> > user-
> > space, we could also have a interface in kernel to do the same?
> 
> Not sure if I follow.
> Currently when blk-integrity allocates/attaches the meta buffer, it 
> decides what to put in it and how to go about integrity 
> generation/verification.
> When user-space is sending the meta buffer, it will decide what to 
> put/verify. Passed meta buffer will be used directly, and blk-
> integrity 
> will only facilitate that without doing any in-kernel 
> generation/verification.
This is what I was trying to get, but for in-kernel users instead of
user-space, however...
> 
> > It would be useful for some network filesystem/block device drivers
> > like nbd/drbd/NVMe-oF to use blk-integrity as network checksum, and
> > the
> > same checksum covers the I/O on the server as well.
> > 
> > The integrity can be generated on the client and send over network,
> > on server blk-integrity can just offload to storage.
> > Verify follows the same principle: on server blk-integrity gets
> > the PI from storage using the interface, and send over network,
> > on client we can do the usual verify.
> > 
> > In the past we tried to achieve this, there's patch to add optional
> > generate/verify functions and they take priority over the ones from
> > the
> > integrity profile, and the optional generate/verify functions does
> > the
> > meta/PI exchange, but that didn't get traction. It would be much
> > better
> > if we can have an bio interface for this.
> 
> Any link to the patches?
> I am not sure what this bio interface is for. Does this mean 
> verify/generate functions to be specified for each bio?
Yes, and it's an awkward way to save the meta/PI before the PI buffer
gets freed right after verify.
> Now also in-kernel users can add the meta buffer to the bio. It is up
> to 
> the bio owner to implement any custom processing on this meta buffer.
This makes me realise if in-kernel user does its own meta/PI buffer
management without bio_integrity_prep(), it won't be freed by
bio_integrity_free() and we can put/get to the meta/PI buffer and reuse
the PI data. I will give this a try. Thanks



  reply	other threads:[~2024-04-03 12:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20240222193304epcas5p318426c5267ee520e6b5710164c533b7d@epcas5p3.samsung.com>
2024-02-22 19:33 ` [LSF/MM/BPF ATTEND][LSF/MM/BPF TOPIC] Meta/Integrity/PI improvements Kanchan Joshi
2024-02-22 20:08   ` Keith Busch
2024-02-23 12:41     ` Kanchan Joshi
2024-02-23 14:38   ` David Sterba
2024-02-26 23:15   ` [Lsf-pc] " Martin K. Petersen
2024-03-27 13:45     ` Kanchan Joshi
2024-03-28  0:30       ` Martin K. Petersen
2024-03-29 11:35         ` Kanchan Joshi
2024-04-03  2:10           ` Martin K. Petersen
2024-04-02 10:45     ` Dongyang Li
2024-04-02 11:37       ` Hannes Reinecke
2024-04-02 16:52       ` Kanchan Joshi
2024-04-03 12:40         ` Dongyang Li [this message]
2024-04-03 12:42           ` hch
2024-04-04  9:53             ` Dongyang Li
2024-04-05  6:12     ` Kent Overstreet

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=d442fe43e7b43d9e00c168f91dcfddd5a240b366.camel@ddn.com \
    --to=dongyangli@ddn.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=josef@toxicpanda.com \
    --cc=joshi.k@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=martin.petersen@oracle.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