From patchwork Tue Apr 5 12:07:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8750971 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 66B759F7C9 for ; Tue, 5 Apr 2016 12:11:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8ACED203A5 for ; Tue, 5 Apr 2016 12:11:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A28BF20204 for ; Tue, 5 Apr 2016 12:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758030AbcDEMH5 (ORCPT ); Tue, 5 Apr 2016 08:07:57 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:35148 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757666AbcDEMHy (ORCPT ); Tue, 5 Apr 2016 08:07:54 -0400 Received: by mail-pa0-f68.google.com with SMTP id zy2so1135689pac.2; Tue, 05 Apr 2016 05:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=5/qenXyDVinGIFNzPNCyOoYOvLe0P8KT3y5QqWfIZEs=; b=Sh22BIoUpVoPQQTDfmdiBt9o11y288jsFrobol1lTFhtsEqoWYF9DRq66fg6i8fVHr 8OkslHTelmlssQkV+/8WSAP2Mua6Tc+ZnQ+gLsaXBOjfHuA3Jqusr+jKAfYOHmxWIH8w rxBk0wwVwDP/mDfD15Vz5I/jj+oX4t+doyki2JR8PNP84HAGg066fvt625/AA+bsyXMQ +3MIh0XE+RyzQrG7Hm72Dje7l+xFIavDPHxUN37OW4XknNbKRcGlBOaIvipqc1gZAx7r fEJZ52Znci7XigfoGQjfB2ImsGkuSuKaFs41/WLkLwIcJCJM7Om9PXtSfFe9kbXkkx0Q obEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5/qenXyDVinGIFNzPNCyOoYOvLe0P8KT3y5QqWfIZEs=; b=Nh49Ymnn7nYzN5dvQb5n2mlvxn5ABXv8zQpehi6fhFcJBOu9bNbXik9mfTA+MWSkDw GDUK37aw2ZyAQoGSS/5/U5hQ3JDhubiWf0AgpSHnOTAnbrjjR5tGxyN+tt/S8PFzOyFn s0iJJuA+sxBf4BTidv1fSLEmvnyCUR3YjwMgWuJXnrvPmVTo4gxJ/ypWrzLshzb0R3oc iOLIJ/Wgc3MrRNCIBpipFVuibSSopqKwxu3skpOHoA/wbANoYUuldLmhwLbrmiADQ6C1 SygJACCMO1MyNRItbN5EG69LOx3UrxP4lp08tJeRkxbDPCPeSwQNC70DzKrBEZ1udW3l PJzw== X-Gm-Message-State: AD7BkJJnlYraDextvt759MJZMavgmieZSvJshAOiHeEooF29ZBAGHeZaxsMBMWkfitQvGQ== X-Received: by 10.66.249.228 with SMTP id yx4mr61507174pac.29.1459858073799; Tue, 05 Apr 2016 05:07:53 -0700 (PDT) Received: from localhost (56.34.213.162.lcy-01.canonistack.canonical.com. [162.213.34.56]) by smtp.gmail.com with ESMTPSA id h19sm46555378pfh.43.2016.04.05.05.07.52 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 05 Apr 2016 05:07:53 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Boaz Harrosh , Ming Lei , Kent Overstreet , Shaohua Li , 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 15/27] bcache: super: use bio_set_vec_table() Date: Tue, 5 Apr 2016 20:07:30 +0800 Message-Id: <1459858062-21075-1-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- 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);