[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230130204758.38f4c6b9@kernel.org>
Date: Mon, 30 Jan 2023 20:47:58 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Christoph Hellwig <hch@....de>
Cc: Jens Axboe <axboe@...nel.dk>, Ilya Dryomov <idryomov@...il.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Minchan Kim <minchan@...nel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Keith Busch <kbusch@...nel.org>,
Sagi Grimberg <sagi@...mberg.me>,
Chaitanya Kulkarni <kch@...dia.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
David Howells <dhowells@...hat.com>,
Marc Dionne <marc.dionne@...istor.com>,
Xiubo Li <xiubli@...hat.com>, Steve French <sfrench@...ba.org>,
Trond Myklebust <trond.myklebust@...merspace.com>,
Anna Schumaker <anna@...nel.org>,
Mike Marshall <hubcap@...ibond.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Chuck Lever <chuck.lever@...cle.com>,
linux-block@...r.kernel.org, ceph-devel@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
linux-nvme@...ts.infradead.org, linux-scsi@...r.kernel.org,
target-devel@...r.kernel.org, kvm@...r.kernel.org,
netdev@...r.kernel.org, linux-afs@...ts.infradead.org,
linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
linux-fsdevel@...r.kernel.org, linux-nfs@...r.kernel.org,
devel@...ts.orangefs.org, io-uring@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH 01/23] block: factor out a bvec_set_page helper
On Mon, 30 Jan 2023 10:21:35 +0100 Christoph Hellwig wrote:
> diff --git a/include/linux/bvec.h b/include/linux/bvec.h
> index 35c25dff651a5e..9e3dac51eb26b6 100644
> --- a/include/linux/bvec.h
> +++ b/include/linux/bvec.h
> @@ -35,6 +35,21 @@ struct bio_vec {
> unsigned int bv_offset;
> };
>
> +/**
> + * bvec_set_page - initialize a bvec based off a struct page
> + * @bv: bvec to initialize
> + * @page: page the bvec should point to
> + * @len: length of the bvec
> + * @offset: offset into the page
> + */
> +static inline void bvec_set_page(struct bio_vec *bv, struct page *page,
> + unsigned int len, unsigned int offset)
> +{
> + bv->bv_page = page;
> + bv->bv_len = len;
> + bv->bv_offset = offset;
> +}
kinda random thought but since we're touching this area - could we
perhaps move the definition of struct bio_vec and trivial helpers
like this into a new header? bvec.h pulls in mm.h which is a right
behemoth :S
Powered by blists - more mailing lists