public inbox for [email protected]
 help / color / mirror / Atom feed
From: Christoph Hellwig <[email protected]>
To: Keith Busch <[email protected]>
Cc: [email protected], [email protected],
	[email protected], [email protected], [email protected],
	[email protected], [email protected],
	Keith Busch <[email protected]>
Subject: Re: [PATCHv3 1/5] bvec: introduce multi-page bvec iterating
Date: Tue, 21 Nov 2023 06:01:12 +0100	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On Mon, Nov 20, 2023 at 02:40:54PM -0800, Keith Busch wrote:
> diff --git a/include/linux/bvec.h b/include/linux/bvec.h
> index 555aae5448ae4..9364c258513e0 100644
> --- a/include/linux/bvec.h
> +++ b/include/linux/bvec.h
> @@ -184,6 +184,12 @@ static inline void bvec_iter_advance_single(const struct bio_vec *bv,
>  		((bvl = bvec_iter_bvec((bio_vec), (iter))), 1);	\
>  	     bvec_iter_advance_single((bio_vec), &(iter), (bvl).bv_len))
>  
> +#define for_each_mp_bvec(bvl, bio_vec, iter, start)			\
> +	for (iter = (start);						\
> +	     (iter).bi_size &&						\
> +		((bvl = mp_bvec_iter_bvec((bio_vec), (iter))), 1);	\
> +	     bvec_iter_advance_single((bio_vec), &(iter), (bvl).bv_len))

Hope thjis isn't too much bike-shedding, but in the block layer
we generally used _segment for the single page bvecs and just bvec
for the not page size limited.  This isn't the best naming either,
but i wonder if it's worth to change the existing 4 callers and be
consistent.  (and maybe one or two of them doesn't want the limit anyway?)

Otherwise this looks good to me.


  reply	other threads:[~2023-11-21  5:01 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 [this message]
2023-11-21  8:37   ` Ming Lei
2023-11-21 15:49     ` Keith Busch
2023-11-22  0:43       ` Ming Lei
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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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