linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 32/54] block: introduce bvec_get_last_sp()
@ 2016-12-27 16:04 Ming Lei
  2016-12-27 16:04 ` [PATCH v1 33/54] block: deal with dirtying pages for multipage bvec Ming Lei
                   ` (21 more replies)
  0 siblings, 22 replies; 24+ messages in thread
From: Ming Lei @ 2016-12-27 16:04 UTC (permalink / raw)
  To: Jens Axboe, linux-kernel
  Cc: linux-block, Christoph Hellwig, Ming Lei, Johannes Berg

BTRFS need to get the last singlepage bvec, so introduce
this helper to make it happy.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
 include/linux/bvec.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/linux/bvec.h b/include/linux/bvec.h
index baf379d56106..e9a623067c52 100644
--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -206,4 +206,14 @@ static inline void bvec_iter_advance_mp(const struct bio_vec *bv,
 #define bvec_for_each_sp_bvec(sp_bvl, mp_bvec, iter)			\
 	__bvec_for_each_sp_bvec(sp_bvl, mp_bvec, iter, BVEC_ITER_ALL_INIT)
 
+/* get the last singlepage bvec from the multipage bvec  */
+static inline void bvec_get_last_sp(struct bio_vec *mp_bv,
+				    struct bio_vec *sp_bv)
+{
+	struct bvec_iter iter;
+
+	bvec_for_each_sp_bvec(*sp_bv, mp_bv, iter)
+		;
+}
+
 #endif /* __LINUX_BVEC_ITER_H */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2017-01-03 14:59 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-27 16:04 [PATCH v1 32/54] block: introduce bvec_get_last_sp() Ming Lei
2016-12-27 16:04 ` [PATCH v1 33/54] block: deal with dirtying pages for multipage bvec Ming Lei
2016-12-27 16:04 ` [PATCH v1 34/54] block: convert to singe/multi page version of bio_for_each_segment_all() Ming Lei
2016-12-27 16:04 ` [PATCH v1 35/54] bcache: convert to bio_for_each_segment_all_sp() Ming Lei
2016-12-27 16:04 ` [PATCH v1 36/54] dm-crypt: don't clear bvec->bv_page in crypt_free_buffer_pages() Ming Lei
2016-12-27 16:04 ` [PATCH v1 37/54] dm-crypt: convert to bio_for_each_segment_all_sp() Ming Lei
2016-12-27 16:04 ` [PATCH v1 38/54] md/raid1.c: " Ming Lei
2016-12-27 16:04 ` [PATCH v1 39/54] fs/mpage: " Ming Lei
2016-12-27 16:04 ` [PATCH v1 40/54] fs/direct-io: " Ming Lei
2016-12-27 16:04 ` [PATCH v1 41/54] ext4: " Ming Lei
2016-12-27 16:04 ` [PATCH v1 42/54] xfs: " Ming Lei
2016-12-27 16:04 ` [PATCH v1 43/54] gfs2: " Ming Lei
2016-12-27 16:04 ` [PATCH v1 44/54] f2fs: " Ming Lei
2016-12-27 16:04 ` [PATCH v1 45/54] exofs: " Ming Lei
2017-01-03 14:58   ` Boaz Harrosh
2016-12-27 16:04 ` [PATCH v1 46/54] fs: crypto: " Ming Lei
2016-12-27 16:04 ` [PATCH v1 47/54] fs/btrfs: " Ming Lei
2016-12-27 16:04 ` [PATCH v1 48/54] fs/block_dev.c: " Ming Lei
2016-12-27 16:04 ` [PATCH v1 49/54] fs/iomap.c: " Ming Lei
2016-12-27 16:04 ` [PATCH v1 50/54] fs/buffer.c: use bvec iterator to truncate the bio Ming Lei
2016-12-27 16:05 ` [PATCH v1 51/54] btrfs: avoid access to .bi_vcnt directly Ming Lei
2016-12-27 16:05 ` [PATCH v1 52/54] btrfs: use bvec_get_last_sp to get the last singlepage bvec Ming Lei
2016-12-27 16:05 ` [PATCH v1 53/54] btrfs: comment on direct access bvec table Ming Lei
2016-12-27 16:05 ` [PATCH v1 54/54] block: enable multipage bvecs Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).