From patchwork Thu Apr 14 12:02:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8835271 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0CE8CC0553 for ; Thu, 14 Apr 2016 12:11:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44F7220173 for ; Thu, 14 Apr 2016 12:11:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6363420204 for ; Thu, 14 Apr 2016 12:11:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754267AbcDNMLD (ORCPT ); Thu, 14 Apr 2016 08:11:03 -0400 Received: from mail-ob0-f194.google.com ([209.85.214.194]:35795 "EHLO mail-ob0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754890AbcDNMDb (ORCPT ); Thu, 14 Apr 2016 08:03:31 -0400 Received: by mail-ob0-f194.google.com with SMTP id 4so4863505obi.2; Thu, 14 Apr 2016 05:03:30 -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=BSoA9qHcEmBuvDZornJcKtN/rniC3gmsL5DvOfmAunU=; b=wkTKujZswlmNRh8kZ53CQFPcYP5BM5MbLjRWEn45LtbqCNBqd7xh0i+OZFPOHbuoeU SZChhh5BQusxQkvUmyKEZa3NBPsTaN7wCtVR/Tt9NzZmAxSbHg6RyrN2CCSX9hlDwz1Y XcHWUD90qjI9hzfYOCM1OMl1FXwWxEFPBRrMJrp/whxhqwxpPQ+sR25CdhdtSvQD/7Gi mfh2FyEwiZwerUu2l3VJ/YErfTzn1SRkRGciHhZXbOebaIF0s+E12488kjuaYOJYSKQq 3tfI3nVHYz13nbXAa5IxebzPEG4eZu3V8r+5H44CUDXcmaGjZ0F8hKl+GhiLWzGBXmwg OX6w== 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=BSoA9qHcEmBuvDZornJcKtN/rniC3gmsL5DvOfmAunU=; b=A1J03pdYQq4Hn9Jgo9Np+vQnzJN77QX/gUnHTNeSESQ5GtSb+MuvkQhqq9xme6WGvm S/waFmNg2RxBKXUJkUYFl41r/nIg2amlXfeSipYNo+GmPA8Emmoc6YbyK797yVnv8P0O mLX/VEkp9a9nJllo1jyh/CBCNdiZHboCA7M3tTKaIJ9UHbwIAjF7QQziyPiSAe7ctn2G 34AcVohjsmcQdxs4Ew2pe0F2khETJZ+WcQn52Qw9hbMPHNN0FztBldE8WDhOQGnTkYSv 05i3/HAGrL2p/KOmlDZ4FfWrWFPVC3uR5WIjg0hON04LT6jAwPihFfhnY6OuCn8iKt1L T6Vw== X-Gm-Message-State: AOPr4FX4Uhx8OKbNATUnIQ6lUKMJdFp7GGXmcDXtuPmCjVmQtupaJQx9zhjC7ibcQeqX3g== X-Received: by 10.60.84.98 with SMTP id x2mr7772883oey.23.1460635410498; Thu, 14 Apr 2016 05:03:30 -0700 (PDT) Received: from localhost ([12.228.154.70]) by smtp.gmail.com with ESMTPSA id m2sm13195525oia.1.2016.04.14.05.03.29 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 14 Apr 2016 05:03:29 -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 11/27] bcache: io.c: use bio_set_vec_table Date: Thu, 14 Apr 2016 20:02:29 +0800 Message-Id: <1460635375-28282-12-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/io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/bcache/io.c b/drivers/md/bcache/io.c index 86a0bb8..1c48462 100644 --- a/drivers/md/bcache/io.c +++ b/drivers/md/bcache/io.c @@ -26,8 +26,7 @@ struct bio *bch_bbio_alloc(struct cache_set *c) bio_init(bio); bio->bi_flags |= BIO_POOL_NONE << BIO_POOL_OFFSET; - bio->bi_max_vecs = bucket_pages(c); - bio->bi_io_vec = bio->bi_inline_vecs; + bio_set_vec_table(bio, bio->bi_inline_vecs, bucket_pages(c)); return bio; }