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


Groups > linux.kernel > #1674665 > unrolled thread

[PATCH v2 17/51] bvec_iter: introduce BVEC_ITER_ALL_INIT

Started byMing Lei <ming.lei@redhat.com>
First post2017-06-26 14:20 +0200
Last post2017-06-26 14:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 17/51] bvec_iter: introduce BVEC_ITER_ALL_INIT Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:20 +0200

#1674665 — [PATCH v2 17/51] bvec_iter: introduce BVEC_ITER_ALL_INIT

FromMing Lei <ming.lei@redhat.com>
Date2017-06-26 14:20 +0200
Subject[PATCH v2 17/51] bvec_iter: introduce BVEC_ITER_ALL_INIT
Message-ID<tWB9M-2fr-17@gated-at.bofh.it>
Introduce BVEC_ITER_ALL_INIT for iterating one bio
from start to end.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 include/linux/bvec.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/linux/bvec.h b/include/linux/bvec.h
index 89b65b82d98f..162ca7caf510 100644
--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -94,4 +94,13 @@ static inline void bvec_iter_advance(const struct bio_vec *bv,
 		((bvl = bvec_iter_bvec((bio_vec), (iter))), 1);	\
 	     bvec_iter_advance((bio_vec), &(iter), (bvl).bv_len))
 
+/* for iterating one bio from start to end */
+#define BVEC_ITER_ALL_INIT (struct bvec_iter)				\
+{									\
+	.bi_sector	= 0,						\
+	.bi_size	= UINT_MAX,					\
+	.bi_idx		= 0,						\
+	.bi_bvec_done	= 0,						\
+}
+
 #endif /* __LINUX_BVEC_ITER_H */
-- 
2.9.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web