From patchwork Tue Dec 27 16:04:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9489473 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7C6D162AB0 for ; Tue, 27 Dec 2016 16:06:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EEDD2094F for ; Tue, 27 Dec 2016 16:06:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6381125D99; Tue, 27 Dec 2016 16:06:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14B732094F for ; Tue, 27 Dec 2016 16:06:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932787AbcL0QF5 (ORCPT ); Tue, 27 Dec 2016 11:05:57 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36470 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932642AbcL0QFt (ORCPT ); Tue, 27 Dec 2016 11:05:49 -0500 Received: by mail-pf0-f194.google.com with SMTP id c4so18358394pfb.3; Tue, 27 Dec 2016 08:05:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IK69XX6pS7u3DcCiJUpprMGWh12Mj7FZcKgUcwPO7So=; b=DByJ1E+cvNdkov/bEBOm8C2rujEOALsiCHSv+FoKLvSHEu8yuYBEw9xE3GRs4jlRaZ RBzaPh84BBLuokAPGpR2FbKxRx6ZUlxck8foccZwqAOZXcJ6KxGX51L3gMMW25WtPCmo GlV0rFxBvIYqZgB/dAH/TkZeJuD6LIfYGqnShlp9NcLOlyXBABUuBHlSnUGEKOWxrgEH EiGNUtwzBpp//Q+5uHII5sgvBwtF4h5de1Dfw5BokqqfwJRAoOWrU6Xt5ALwLSAruIzb rtRaoveGVNbWqWTIpGXbZse1A6yfnNOow6HIQCcQS7dJl9v9rXoBsnyTVN/ZHNGvORsU os/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IK69XX6pS7u3DcCiJUpprMGWh12Mj7FZcKgUcwPO7So=; b=C51MICW1YeSc/BtskD2fn35sFI2KX9GJY6x6Aafvzy8LtPfVJpM8UoPTVNHaRFn8zE A4PrQ5d8lleSDRENUophKG3RyFryCNsyuuuW299CKYIWi0Jv3DWkeZ0pBS2FuW4Vkmef s4O1OFwE5D51LoNYJ/Iyy1fYmH+LETaFu590bYcNX59pRuHcGc7XCMJ3HnN4u3nvQDJE GpJs9qzBEhNt1r+NIJ+iW8e4DE1qh2AH8pQpkZj0qeX/39PEVDSU/VGJXtnx2sHicoWA X46agewMBJHGceW5rO9zPuimfxb72OEsQ27pCFpyj1oJG72TDlQAmW2roLWGCmeP94px IGnA== X-Gm-Message-State: AIkVDXK+8eRuMhX7b3LP4P0JNz/QGO17Agd+QWr8HgTH/BeGDNt378Qq/p2XjuDJF51rCQ== X-Received: by 10.84.212.144 with SMTP id e16mr68227002pli.140.1482854748061; Tue, 27 Dec 2016 08:05:48 -0800 (PST) Received: from localhost ([45.35.47.137]) by smtp.gmail.com with ESMTPSA id s3sm58543840pfg.14.2016.12.27.08.05.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 08:05:46 -0800 (PST) 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 , Hannes Reinecke , Takashi Iwai , Jiri Kosina , Mike Christie , Guoqing Jiang , Zheng Liu , 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 35/54] bcache: convert to bio_for_each_segment_all_sp() Date: Wed, 28 Dec 2016 00:04:44 +0800 Message-Id: <1482854706-14128-4-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482854706-14128-1-git-send-email-tom.leiming@gmail.com> References: <1482854706-14128-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-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- drivers/md/bcache/btree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index fc35cfb4d0f1..61d40b1903f3 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -419,8 +419,9 @@ static void do_btree_node_write(struct btree *b) int j; struct bio_vec *bv; void *base = (void *) ((unsigned long) i & ~(PAGE_SIZE - 1)); + struct bvec_iter_all bia; - bio_for_each_segment_all(bv, b->bio, j) + bio_for_each_segment_all_sp(bv, b->bio, j, bia) memcpy(page_address(bv->bv_page), base + j * PAGE_SIZE, PAGE_SIZE);