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


Groups > linux.kernel > #1371471

[PATCH 15/27] bcache: super: use bio_set_vec_table()

From Ming Lei <tom.leiming@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 15/27] bcache: super: use bio_set_vec_table()
Date 2016-04-05 14:10 +0200
Message-ID <rkxXX-36a-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
 drivers/md/bcache/super.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index a296425..3f649c9 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -1151,8 +1151,7 @@ static void register_bdev(struct cache_sb *sb, struct page *sb_page,
 	dc->bdev->bd_holder = dc;
 
 	bio_init(&dc->sb_bio);
-	dc->sb_bio.bi_max_vecs	= 1;
-	dc->sb_bio.bi_io_vec	= dc->sb_bio.bi_inline_vecs;
+	bio_set_vec_table(&dc->sb_bio, dc->sb_bio.bi_inline_vecs, 1);
 	dc->sb_bio.bi_io_vec[0].bv_page = sb_page;
 	get_page(sb_page);
 
@@ -1812,8 +1811,8 @@ static int cache_alloc(struct cache_sb *sb, struct cache *ca)
 	kobject_init(&ca->kobj, &bch_cache_ktype);
 
 	bio_init(&ca->journal.bio);
-	ca->journal.bio.bi_max_vecs = 8;
-	ca->journal.bio.bi_io_vec = ca->journal.bio.bi_inline_vecs;
+	bio_set_vec_table(&ca->journal.bio,
+			  ca->journal.bio.bi_inline_vecs, 8);
 
 	free = roundup_pow_of_two(ca->sb.nbuckets) >> 10;
 
@@ -1850,8 +1849,7 @@ static int register_cache(struct cache_sb *sb, struct page *sb_page,
 	ca->bdev->bd_holder = ca;
 
 	bio_init(&ca->sb_bio);
-	ca->sb_bio.bi_max_vecs	= 1;
-	ca->sb_bio.bi_io_vec	= ca->sb_bio.bi_inline_vecs;
+	bio_set_vec_table(&ca->sb_bio, ca->sb_bio.bi_inline_vecs, 1);
 	ca->sb_bio.bi_io_vec[0].bv_page = sb_page;
 	get_page(sb_page);
 
-- 
1.9.1

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


Thread

[PATCH 15/27] bcache: super: use bio_set_vec_table() Ming Lei <tom.leiming@gmail.com> - 2016-04-05 14:10 +0200
  [PATCH 18/27] dm: dm-io.c: use bio_get_base_vec() Ming Lei <tom.leiming@gmail.com> - 2016-04-05 14:10 +0200
  [PATCH 22/27] fs: logfs: convert to bio_add_page() in sync_request() Ming Lei <tom.leiming@gmail.com> - 2016-04-05 14:10 +0200
    Re: [PATCH 22/27] fs: logfs: convert to bio_add_page() in  sync_request() Christoph Hellwig <hch@infradead.org> - 2016-04-05 15:00 +0200
  [PATCH 19/27] dm: dm.c: replace 'bio->bi_vcnt == 1' with !bio_multiple_segments Ming Lei <tom.leiming@gmail.com> - 2016-04-05 14:10 +0200
  [PATCH 26/27] kernel/power/swap.c: use bio_get_base_vec() Ming Lei <tom.leiming@gmail.com> - 2016-04-05 14:20 +0200
    Re: [PATCH 26/27] kernel/power/swap.c: use bio_get_base_vec() Christoph Hellwig <hch@infradead.org> - 2016-04-05 15:00 +0200
      Re: [PATCH 26/27] kernel/power/swap.c: use bio_get_base_vec() Ming Lei <tom.leiming@gmail.com> - 2016-04-05 15:20 +0200
  [PATCH 25/27] fs: logfs: remove unnecesary check Ming Lei <tom.leiming@gmail.com> - 2016-04-05 14:20 +0200
  [PATCH 27/27] mm: page_io.c: use bio_get_base_vec() Ming Lei <tom.leiming@gmail.com> - 2016-04-05 14:20 +0200
  [PATCH 24/27] fs: logfs: use bio_add_page() in do_erase() Ming Lei <tom.leiming@gmail.com> - 2016-04-05 14:20 +0200

csiph-web