From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ming Lei Subject: [PATCH 57/60] bcache: convert to bio_for_each_segment_all_rd() Date: Sat, 29 Oct 2016 16:08:56 +0800 Message-ID: <1477728600-12938-58-git-send-email-tom.leiming@gmail.com> References: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> Return-path: In-Reply-To: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , "Kirill A . Shutemov" , Ming Lei , Kent Overstreet , Shaohua Li , Hannes Reinecke , Jiri Kosina , Mike Christie , Guoqing Jiang , Zheng Liu , "open list:BCACHE BLOCK LAYER CACHE" , "open list:SOFTWARE RAID Multiple Disks SUPPORT" List-Id: linux-raid.ids Signed-off-by: Ming Lei --- drivers/md/bcache/btree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index b419bc91ba32..89abada6a091 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -419,8 +419,9 @@ static void do_btree_node_write(struct btree *b) int j; struct bio_vec *bv; void *base = (void *) ((unsigned long) i & ~(PAGE_SIZE - 1)); + struct bvec_iter_all bia; - bio_for_each_segment_all(bv, b->bio, j) + bio_for_each_segment_all_rd(bv, b->bio, j, bia) memcpy(page_address(bv->bv_page), base + j * PAGE_SIZE, PAGE_SIZE); -- 2.7.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , "Kirill A . Shutemov" , Ming Lei , Kent Overstreet , Shaohua Li , Hannes Reinecke , Jiri Kosina , Mike Christie , Guoqing Jiang , Zheng Liu , linux-bcache@vger.kernel.org (open list:BCACHE (BLOCK LAYER CACHE)), linux-raid@vger.kernel.org (open list:SOFTWARE RAID (Multiple Disks) SUPPORT) Subject: [PATCH 57/60] bcache: convert to bio_for_each_segment_all_rd() Date: Sat, 29 Oct 2016 16:08:56 +0800 Message-Id: <1477728600-12938-58-git-send-email-tom.leiming@gmail.com> In-Reply-To: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> References: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Signed-off-by: Ming Lei --- drivers/md/bcache/btree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index b419bc91ba32..89abada6a091 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -419,8 +419,9 @@ static void do_btree_node_write(struct btree *b) int j; struct bio_vec *bv; void *base = (void *) ((unsigned long) i & ~(PAGE_SIZE - 1)); + struct bvec_iter_all bia; - bio_for_each_segment_all(bv, b->bio, j) + bio_for_each_segment_all_rd(bv, b->bio, j, bia) memcpy(page_address(bv->bv_page), base + j * PAGE_SIZE, PAGE_SIZE); -- 2.7.4