Thread (57 messages) 57 messages, 5 authors, 2018-06-21

[PATCH V6 13/30] block: introduce rq_for_each_chunk()

STALE3027d

From: Ming Lei <hidden>
Date: 2018-06-09 12:29:57
Also in: linux-fsdevel, linux-mm, lkml
Subsystem: block layer, the rest · Maintainers: Jens Axboe, Linus Torvalds

Revision v6 of 7 in this series.

Revisions (7)
  1. v2 [diff vs current]
  2. v3 [diff vs current]
  3. v4 [diff vs current]
  4. v5 [diff vs current]
  5. v5 [diff vs current]
  6. v6 current
  7. v7 [diff vs current]
There are still cases in which rq_for_each_chunk() is required, for
example, loop.

Signed-off-by: Ming Lei <redacted>
---
 include/linux/blkdev.h | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index bca3a92eb55f..4eaba73c784a 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -941,6 +941,10 @@ struct req_iterator {
 	__rq_for_each_bio(_iter.bio, _rq)			\
 		bio_for_each_segment(bvl, _iter.bio, _iter.iter)
 
+#define rq_for_each_chunk(bvl, _rq, _iter)			\
+	__rq_for_each_bio(_iter.bio, _rq)			\
+		bio_for_each_chunk(bvl, _iter.bio, _iter.iter)
+
 #define rq_iter_last(bvec, _iter)				\
 		(_iter.bio->bi_next == NULL &&			\
 		 bio_iter_last(bvec, _iter.iter))
-- 
2.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help