All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Keith Busch <kbusch@kernel.org>
Cc: Keith Busch <kbusch@meta.com>,
	linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
	io-uring@vger.kernel.org, axboe@kernel.dk, hch@lst.de,
	joshi.k@samsung.com, martin.petersen@oracle.com,
	ming.lei@redhat.com
Subject: Re: [PATCHv3 1/5] bvec: introduce multi-page bvec iterating
Date: Wed, 22 Nov 2023 08:43:48 +0800	[thread overview]
Message-ID: <ZV1OxMPsJYq7Tyaw@fedora> (raw)
In-Reply-To: <ZVzRmQ66yRDJWMiZ@kbusch-mbp>

On Tue, Nov 21, 2023 at 08:49:45AM -0700, Keith Busch wrote:
> On Tue, Nov 21, 2023 at 04:37:01PM +0800, Ming Lei wrote:
> > On Mon, Nov 20, 2023 at 02:40:54PM -0800, Keith Busch wrote:
> > > From: Keith Busch <kbusch@kernel.org>
> > > 
> > > Some bio_vec iterators can handle physically contiguous memory and have
> > > no need to split bvec consideration on page boundaries.
> > 
> > Then I am wondering why this helper is needed, and you can use each bvec
> > directly, which is supposed to be physically contiguous.
> 
> It's just a helper function to iterate a generic bvec.

I just look into patch 3 about the use, seems what you need is for_each_bvec_all(),
which is safe & efficient to use when freeing the host data(bio or bip), but can't
be used in split bio/bip, in which the generic iterator is needed.

And you can open-code it in bio_integrity_unmap_user():

for (i = 0; i < bip->bip_vcnt; i++) {
	struct bio_vec *v = &bip->bip_vec[i];

	...
}

Thanks,
Ming


  reply	other threads:[~2023-11-22  0:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 22:40 [PATCHv3 0/5] block integrity: directly map user space addresses Keith Busch
2023-11-20 22:40 ` [PATCHv3 1/5] bvec: introduce multi-page bvec iterating Keith Busch
2023-11-21  5:01   ` Christoph Hellwig
2023-11-21  8:37   ` Ming Lei
2023-11-21 15:49     ` Keith Busch
2023-11-22  0:43       ` Ming Lei [this message]
2023-11-22  0:54         ` Keith Busch
2023-11-20 22:40 ` [PATCHv3 2/5] block: bio-integrity: directly map user buffers Keith Busch
2023-11-20 23:19   ` Jens Axboe
2023-11-21  5:04   ` Christoph Hellwig
2023-11-21 16:10   ` Anuj gupta
2023-11-20 22:40 ` [PATCHv3 3/5] nvme: use bio_integrity_map_user Keith Busch
2023-11-21  5:05   ` Christoph Hellwig
2023-11-20 22:40 ` [PATCHv3 4/5] iouring: remove IORING_URING_CMD_POLLED Keith Busch
2023-11-21  5:05   ` Christoph Hellwig
2023-11-20 22:40 ` [PATCHv3 5/5] io_uring: remove uring_cmd cookie Keith Busch
2023-11-21  5:05   ` Christoph Hellwig

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=ZV1OxMPsJYq7Tyaw@fedora \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=io-uring@vger.kernel.org \
    --cc=joshi.k@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.