From patchwork Thu Apr 14 12:02:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8835171 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 75F249F3A0 for ; Thu, 14 Apr 2016 12:09:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A086F20122 for ; Thu, 14 Apr 2016 12:09:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B597F20173 for ; Thu, 14 Apr 2016 12:09:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755163AbcDNMIo (ORCPT ); Thu, 14 Apr 2016 08:08:44 -0400 Received: from mail-ob0-f196.google.com ([209.85.214.196]:33249 "EHLO mail-ob0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754885AbcDNMDf (ORCPT ); Thu, 14 Apr 2016 08:03:35 -0400 Received: by mail-ob0-f196.google.com with SMTP id js7so4889143obc.0; Thu, 14 Apr 2016 05:03:35 -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:in-reply-to:references; bh=4Bdh/lKzUTD8y2X4xB1AB5tkQWBM2MHKMZoaVkbGJ6Y=; b=zeD09pk1rvrU00ARab30IoZaoHrBSTgVb04FJjQfaCD6HE7AzGB/MCv6j+gKgRKwpj 16qIq/ZEGmryKbirEPkZhmrPFCXMItKCeej8d/ZMEjAHmZurkfnYmtf/GJvdRPhoOXrD UoGbfUgFoB7EMv6FXsMazQsbXbdgHHgCYQefkKUnOGTGzxrZqBe7RhaR6ypzC5DEFtbm mwgrTstDmhpKtP9Cddq2bFA/IzExXsdv+DRa5+Zmzx+mwXLPhHlUZoGZuX3ONls6JXqr 7WKfI8nqvvbW+EoKnII6UxUR55fR+RRxLii6khehxMt5jvFdJgvY5HcWE1licMxw7WFA 5s3w== 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:in-reply-to :references; bh=4Bdh/lKzUTD8y2X4xB1AB5tkQWBM2MHKMZoaVkbGJ6Y=; b=g4KrOw8wx1+OK+m4W6ek3194DeDcMngsMT6jXl+x/ufRJjW9gO4rrVNTJcDUfvk9av RfNJIzVh5oRUENV54eNH4ACZz949O2/SMl7tQ7O88Y7epZIUKLsAgbAKuQHbPmOh/D2C SxEumYwVTAGE6PLlnRRpipdimHWsjURmdlNf3vDKdsXZ9eHom0Mq84Uh2lZHGuYj5tIg 9vrqHFHof1DATZYFDSo/Bj2BLT6A0FGccEeKupR7CpNw9ujSP+vO8Kb2Bj05SGwfy3IF +VER2QjZgftBYtT/0SWJdWQb5VI8kU7Q76eTibqog52HDMRqoKOiWnSFkr+NDk6mZ47b lqdg== X-Gm-Message-State: AOPr4FUNkiqYNRMMBLWwgVHzPItLp2m7UUaP6M/xsPbl1PexEq9n5xBOWTKgkXZamNwIqA== X-Received: by 10.182.233.131 with SMTP id tw3mr7766922obc.80.1460635415081; Thu, 14 Apr 2016 05:03:35 -0700 (PDT) Received: from localhost ([12.228.154.70]) by smtp.gmail.com with ESMTPSA id k10sm7189575oex.2.2016.04.14.05.03.34 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 14 Apr 2016 05:03:34 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , 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 v1 15/27] bcache: super: use bio_set_vec_table() Date: Thu, 14 Apr 2016 20:02:33 +0800 Message-Id: <1460635375-28282-16-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> References: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> 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 f5dbb4e..3fa1ecf 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);