From patchwork Sat Oct 29 08:08:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9403265 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 865F560587 for ; Sat, 29 Oct 2016 08:18:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7216029D0F for ; Sat, 29 Oct 2016 08:18:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63F7B29D76; Sat, 29 Oct 2016 08:18:51 +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 149FD29D0F for ; Sat, 29 Oct 2016 08:18:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942498AbcJ2ISd (ORCPT ); Sat, 29 Oct 2016 04:18:33 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36074 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966412AbcJ2IQH (ORCPT ); Sat, 29 Oct 2016 04:16:07 -0400 Received: by mail-pf0-f195.google.com with SMTP id n85so3391586pfi.3; Sat, 29 Oct 2016 01:16:06 -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=8KAtCX2kVOgWm7TwjNe/4u9FFMnxks8T4PuhVaFXlPw=; b=sIzRzkvFjsKtyV5jJop7LYWETTexpWiT9QbxRrsC8lTpFkI2y0pmOCWvHcAk/fND15 vlvjsGIZBydxMo3XWi6FnAnFA0qocGzQcriBCIKjUAWfzthTjUSWveKRBzN2csboarNB JmkBJ39PJP3rIy7UpL+LA83ljfG96Di+0qu3xH5SfpZ9FN+S+F3VhILMYvsldvB0VyjB Gfa0Wg3APg3MU3FgEBvNpVRZMXUpYJBAqL4VkO5Dku5jMRQ64wdAiMPfydoZ9asITnYc zI5gZn0Iti63IuMJlyWukmN2T+xSOzXy9EmMOobOOWrnt+IiusSPmdDBLTAXVEHbNSX9 aIXg== 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=8KAtCX2kVOgWm7TwjNe/4u9FFMnxks8T4PuhVaFXlPw=; b=ByrKyihNfA75kOUG1GKBUrrybZd9eCWLBZ/5OQ1ln/tNPRI9oF/WBWuECNmFjFBmja KivXgQ3mKKLsk7ITGLumYZYwTv1aD0hYIPRjEd1zCa44IDj4stqfa1WLYfcoAhoynLjF 4JjRnb83FzVT49HyDDNWvHw7SjYqaLfR/rsPbF11/XCL6zKFqhHJsiQk7A6XZt8fIng6 1LCWX873o+v1obt6mM327uVDgM9WykMmC8++OAAus6mM9NpmnKAK8/4zFXhfPwl2blrn 7uD4G+VhTf96rZ8vDZrByNgGQMnpxHSLxoEkT3V95OX9ZBkAyQhRwZ3dh7nF35Z8N6z7 LsQw== X-Gm-Message-State: ABUngvdhEn/Canghi7WWl3a+MkfK4Ntxv+4u+6UwCL9zCedY1FruA+oNmh4lGAksuyYf4A== X-Received: by 10.98.11.21 with SMTP id t21mr31864494pfi.131.1477728966507; Sat, 29 Oct 2016 01:16:06 -0700 (PDT) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id 188sm23564171pfd.9.2016.10.29.01.16.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 01:16:05 -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 , Boaz Harrosh , Benny Halevy , osd-dev@open-osd.org (open list:OSD LIBRARY and FILESYSTEM) Subject: [PATCH 55/60] exofs: convert to bio_for_each_segment_all_rd() Date: Sat, 29 Oct 2016 16:08:54 +0800 Message-Id: <1477728600-12938-56-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-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 --- fs/exofs/ore.c | 3 ++- fs/exofs/ore_raid.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/exofs/ore.c b/fs/exofs/ore.c index 8bb72807e70d..826696f3bdf2 100644 --- a/fs/exofs/ore.c +++ b/fs/exofs/ore.c @@ -406,8 +406,9 @@ static void _clear_bio(struct bio *bio) { struct bio_vec *bv; unsigned i; + struct bvec_iter_all bia; - bio_for_each_segment_all(bv, bio, i) { + bio_for_each_segment_all_rd(bv, bio, i, bia) { unsigned this_count = bv->bv_len; if (likely(PAGE_SIZE == this_count)) diff --git a/fs/exofs/ore_raid.c b/fs/exofs/ore_raid.c index 27cbdb697649..a083d2f3f10d 100644 --- a/fs/exofs/ore_raid.c +++ b/fs/exofs/ore_raid.c @@ -429,6 +429,7 @@ static void _mark_read4write_pages_uptodate(struct ore_io_state *ios, int ret) { struct bio_vec *bv; unsigned i, d; + struct bvec_iter_all bia; /* loop on all devices all pages */ for (d = 0; d < ios->numdevs; d++) { @@ -437,7 +438,7 @@ static void _mark_read4write_pages_uptodate(struct ore_io_state *ios, int ret) if (!bio) continue; - bio_for_each_segment_all(bv, bio, i) { + bio_for_each_segment_all_rd(bv, bio, i, bia) { struct page *page = bv->bv_page; SetPageUptodate(page);