From patchwork Sat Oct 29 08:08:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9403251 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 A6C7960588 for ; Sat, 29 Oct 2016 08:17:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9400729D0F for ; Sat, 29 Oct 2016 08:17:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8882029D76; Sat, 29 Oct 2016 08:17:20 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 463C829D0F for ; Sat, 29 Oct 2016 08:17:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966488AbcJ2IQV (ORCPT ); Sat, 29 Oct 2016 04:16:21 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36119 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966390AbcJ2IQQ (ORCPT ); Sat, 29 Oct 2016 04:16:16 -0400 Received: by mail-pf0-f196.google.com with SMTP id n85so3391904pfi.3; Sat, 29 Oct 2016 01:16:16 -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=n1FO8FRQ6KlqFvqbaH/tR1kK7wX1VvUJ24Zv3AbUfKI=; b=L2HIDw4NqYEZzh/GPJJEJeFU8KYL3d4W9TURHVhezFrvvE2CigadQOV+quhkzWK3fL 3gTOGF8BsaJvfhFsLVLkQ1P4xu63bHlVeJgbDje+S3Oi2NxnZAvNPySTd30VvK2j46Bw SwwwfluOl/C5qHPHyAwy/Fmy/kTUeqMfWGdlombPtqL9bM56RecMHG6ubA29BEeZlj5N 9O+S/LF9o8BFjTUsC07hzs9pV6ptWsiNrph0IcVxBxNWWvsa0FZK2k/Z1KjWEn+oWEhi sTLOpvF17ZWZQs8i447t9AHbjKI4dpEtpyKc9AWkMFNzLFhASl9uNmz4+IKGkeIHdCT9 P0hg== 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=n1FO8FRQ6KlqFvqbaH/tR1kK7wX1VvUJ24Zv3AbUfKI=; b=LVHwRifeYYAKohQlQeu52J3DmCSpSyLnfKaBYeJ5/zQVTgpWViI9vEiNtc8JPyXA8w yq8DESJ99RIskgPn3RqdCGUixwG17qZ64J7M6ggnnG77deSt8oaKM/COcutXBQzkcB/T 8yk3wfJHf6VbNs3wIqjU7Dr4BOblJHFHE3gFxS7ZFW8hq5gTXcNQt2H5VNoUXXq27dl9 JcOPkOZ2KT115IkP4jRJnGRmWeiwbVGnGiMGwLuGVsEj9z+NSG4s7ANlSTiA5jpEBD7h EINJ7nCwXYjxNtetpylZcInX49DuV07VQqcXw84bw8uRzfE1AzS4xOi9371liDb8Rfib zKiA== X-Gm-Message-State: ABUngvdb1EMF0NvNuzBxAt5Bh85eukQJpivw8EX+f7M+W56HVuntaQcQJeKSRn7430zaMw== X-Received: by 10.98.10.6 with SMTP id s6mr31648962pfi.8.1477728975802; Sat, 29 Oct 2016 01:16:15 -0700 (PDT) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id xv9sm23566387pab.36.2016.10.29.01.16.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 01:16:15 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , "Kirill A . Shutemov" , Ming Lei , Kent Overstreet , Shaohua Li , Hannes Reinecke , 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 57/60] bcache: convert to bio_for_each_segment_all_rd() Date: Sat, 29 Oct 2016 16:08:56 +0800 Message-Id: <1477728600-12938-58-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> References: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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 b419bc91ba32..89abada6a091 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_rd(bv, b->bio, j, bia) memcpy(page_address(bv->bv_page), base + j * PAGE_SIZE, PAGE_SIZE);