From patchwork Tue Apr 5 11:56:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8750361 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 87E939F336 for ; Tue, 5 Apr 2016 12:02:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4C6AE203A1 for ; Tue, 5 Apr 2016 12:02:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 758E02034F for ; Tue, 5 Apr 2016 12:02:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932907AbcDEMAs (ORCPT ); Tue, 5 Apr 2016 08:00:48 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33987 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932875AbcDEMAp (ORCPT ); Tue, 5 Apr 2016 08:00:45 -0400 Received: by mail-pf0-f195.google.com with SMTP id d184so1173581pfc.1; Tue, 05 Apr 2016 05:00:44 -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=Y9ZkBV37hpcMRgjadVxVgiUEFfMG/B7Dt0UCTPEOP2c=; b=zCaVzkwMklf36DieJPJfoxVy76dmwmsq8LymBJAFT7hJXNauqisw7nBJ4lyAZR4s3f em4IFTJWNr67bfDo3wOakGiw6VSM2aYxal2sREKRz4EgALArcLhQAN2P6Traec57SFLY TxOwVcRmsTrBKCB/0jsR1SVse3vaL0A7a/I7Jx6deZcMUoC8mqTZiARqUUQv56y/2Fm3 3fSnvKZan67SAlro3RbqNfagyYlrjsChadEDT0X3RJLdksd4sB26ATTLC+qdnHA431aN RD+8GKK29kjiB7zPJ7AVDI894IvfQ+kVZVKPgS58KxKeo/l87Cl35pnDmlbCu6c39god toCg== 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=Y9ZkBV37hpcMRgjadVxVgiUEFfMG/B7Dt0UCTPEOP2c=; b=ku+G5QADKBH3NWL9fsfJh3VaT8BcGRBbwmp7CzkyDFGpOqrkiNtw/zvOWcDPkDZruK DnfWXbVnPAFiBRhP0+Qt8FA+iA8/f2ghhcbxV1UPrE4CpPYPjWGlGbwSFHoRVgP/V2Jz 0ezFh81swBQg5fiEEnjlhEaFLucHwmneUlHGkr7O0rrAJNN2vFoWnAxBhlG9mgG07Q8h PFlbP5kTNRFiiu0iTaootQhAGiDIEJkQJJBzD8woaWMmmRXAB5sU2TlFOJiDP6Y5ra+T smjjr7QR0B1xwZpnmHPQ5nCZgeHKod7aRzRbEDgI7y9rMH1LJsZW789f84BI+cnyqRZs aIGw== X-Gm-Message-State: AD7BkJLomWWhH31nZmDshFub6DheLdQpMD4msE/zyiMOlbsCF+nsJw4C5CMeNsFM7w/Kuw== X-Received: by 10.98.70.138 with SMTP id o10mr28946854pfi.123.1459857644324; Tue, 05 Apr 2016 05:00:44 -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 a22sm46539165pfj.2.2016.04.05.05.00.42 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 05 Apr 2016 05:00:43 -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 12/27] bcache: journal.c: use bio_set_vec_table() Date: Tue, 5 Apr 2016 19:56:57 +0800 Message-Id: <1459857443-20611-13-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459857443-20611-1-git-send-email-tom.leiming@gmail.com> References: <1459857443-20611-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/journal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index 29eba72..bf8924f 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c @@ -453,8 +453,7 @@ static void do_journal_discard(struct cache *ca) ca->sb.d[ja->discard_idx]); bio->bi_bdev = ca->bdev; bio->bi_rw = REQ_WRITE|REQ_DISCARD; - bio->bi_max_vecs = 1; - bio->bi_io_vec = bio->bi_inline_vecs; + bio_set_vec_table(bio, bio->bi_inline_vecs, 1); bio->bi_iter.bi_size = bucket_bytes(ca); bio->bi_end_io = journal_discard_endio;