Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1649976

[RFC PATCH 09/16] bvec: introduce bvec_page and bvec_set_page accessors

From Logan Gunthorpe <logang@deltatee.com>
Newsgroups linux.kernel
Subject [RFC PATCH 09/16] bvec: introduce bvec_page and bvec_set_page accessors
Date 2017-05-24 23:50 +0200
Message-ID <tKMkj-7HS-45@gated-at.bofh.it> (permalink)
References <tKMkh-7HS-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Introduce two accessor functions for bv_page: bvec_page to return the
page and bvec_set_page. A follow on patch will mechanically convert all the
individual uses within the kernel.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Stephen Bates <sbates@raithlin.com>
---
 include/linux/bvec.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/linux/bvec.h b/include/linux/bvec.h
index 89b65b8..b5369a0 100644
--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -43,6 +43,16 @@ struct bvec_iter {
 						   current bvec */
 };
 
+static inline struct page *bvec_page(const struct bio_vec *bvec)
+{
+	return bvec->bv_page;
+}
+
+static inline void bvec_set_page(struct bio_vec *bvec, struct page *page)
+{
+	bvec->bv_page = page;
+}
+
 /*
  * various member access, note that bio_data should of course not be used
  * on highmem page vectors
-- 
2.1.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH 00/16] Unmappable memory in SGLs for p2p transfers Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200
  [RFC PATCH 04/16] um: add dummy ioremap and iounmap functions Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200
  [RFC PATCH 15/16] dma-mapping: introduce and use unmappable safe sg_virt call Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200
  [RFC PATCH 02/16] staging: ccree: Cleanup: remove references to page_link Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200
  [RFC PATCH 09/16] bvec: introduce bvec_page and bvec_set_page accessors Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200
  [RFC PATCH 16/16] nvmet: use unmappable sgl in rdma target Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200
  [RFC PATCH 11/16] bvec: convert to using pfn_t internally Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200
  [RFC PATCH 03/16] kfifo: Cleanup example to not use page_link Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200

csiph-web