From patchwork Thu Apr 14 12:02:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8835201 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 AA59D9F3D1 for ; Thu, 14 Apr 2016 12:09:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D539020204 for ; Thu, 14 Apr 2016 12:09:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B48322017E for ; Thu, 14 Apr 2016 12:09:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755215AbcDNMJD (ORCPT ); Thu, 14 Apr 2016 08:09:03 -0400 Received: from mail-ob0-f196.google.com ([209.85.214.196]:36737 "EHLO mail-ob0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754939AbcDNMDe (ORCPT ); Thu, 14 Apr 2016 08:03:34 -0400 Received: by mail-ob0-f196.google.com with SMTP id rf6so4871642obc.3; Thu, 14 Apr 2016 05:03:34 -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=o15JNCxSYaprVJx5QwBiHR/q0ufo9BIaWHCtw1rguC8=; b=W+P3ejAabmSsaWCLhleHqPtMHSWroeMPs5ilwN6YB6sJ1cbHSfj47ooC4vcozwS2oM 1cWOiwiVPD7eDU98LZIjUizQScDk/WUM/xx9LKdZDc9Ey7vW3ltwsbvokoliTsfVV2lL qoI/i6Hp7tppGMbHwR2NZAwq3mYsq86Z/VvQuEL6G52rXxHSYzGzPnOmNNrghHp6tqCN vLWB9HeauQd1wr97cvzwIx7WzHKYzIincxR+AgjxdGxKw94mO+ewyBgR5BGUAng+ueNa CZVmHcEH7DJjpbrksFBfIy5TUpp9W8Shs/kA4emZMKH3y92S91YyJQooQs91n232rqcx g0nQ== 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=o15JNCxSYaprVJx5QwBiHR/q0ufo9BIaWHCtw1rguC8=; b=BsXZdiVTEqw+nGKEtboD7Fpppsn3BF5C6m30+G3uJVXSYC2z0+S3eww7nwTfLFqgXr 7SB8ePf3eQz6RdVw+MuI3Dz1iEPVOa295Dpm0vCjSkjkwJPItFBxOyZpPzN1yvThqqyX J0YWxQ8GU6/jE4SEyErdviuhiPgCz8CuTJ7ZqmNqyGDiKuc7wDxurxvMifzSNaU9VKtv 5NXxJBO4aXXeeB/+A1SrdiRgAGAO1BnJPherdI9iSgqWB+93+nFpypiSAq5e8/kyy7UY YdPcYgAkY5ai35zDYTTtCxm8vO//PVqZysSzgAeSUQqNAfg2iMEJTANgJgkn//hu8hBF wDwQ== X-Gm-Message-State: AOPr4FX6WlOtS+VBx4JadUyHpjHTssD93o0Vv3B3a8kmilAaCO6I01lCjzUVk8tLlnhg+w== X-Received: by 10.182.150.41 with SMTP id uf9mr4515158obb.38.1460635413788; Thu, 14 Apr 2016 05:03:33 -0700 (PDT) Received: from localhost ([12.228.154.70]) by smtp.gmail.com with ESMTPSA id q184sm13179635oif.6.2016.04.14.05.03.33 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 14 Apr 2016 05:03:33 -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 14/27] bcache: writeback: use bio_set_vec_table() Date: Thu, 14 Apr 2016 20:02:32 +0800 Message-Id: <1460635375-28282-15-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=ham 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/writeback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c index b9346cd..49a8f8a 100644 --- a/drivers/md/bcache/writeback.c +++ b/drivers/md/bcache/writeback.c @@ -112,9 +112,9 @@ static void dirty_init(struct keybuf_key *w) bio_set_prio(bio, IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0)); bio->bi_iter.bi_size = KEY_SIZE(&w->key) << 9; - bio->bi_max_vecs = DIV_ROUND_UP(KEY_SIZE(&w->key), PAGE_SECTORS); bio->bi_private = w; - bio->bi_io_vec = bio->bi_inline_vecs; + bio_set_vec_table(bio, bio->bi_inline_vecs, + DIV_ROUND_UP(KEY_SIZE(&w->key), PAGE_SECTORS)); bch_bio_map(bio, NULL); }