From patchwork Sat Jun 9 12:30:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10455625 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 97D90601F7 for ; Sat, 9 Jun 2018 12:35:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A87D1FF83 for ; Sat, 9 Jun 2018 12:35:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7EF2D223A6; Sat, 9 Jun 2018 12:35:09 +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=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A8C61FF83 for ; Sat, 9 Jun 2018 12:35:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 291B96B0290; Sat, 9 Jun 2018 08:35:08 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 240476B0292; Sat, 9 Jun 2018 08:35:08 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 156F56B0293; Sat, 9 Jun 2018 08:35:08 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt0-f198.google.com (mail-qt0-f198.google.com [209.85.216.198]) by kanga.kvack.org (Postfix) with ESMTP id E1C646B0290 for ; Sat, 9 Jun 2018 08:35:07 -0400 (EDT) Received: by mail-qt0-f198.google.com with SMTP id p12-v6so14542006qtg.5 for ; Sat, 09 Jun 2018 05:35:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=qiIuc4Jrd5OMq+JvJamUY4gVFhwrKuhLKXdj7pDQD1M=; b=VGFL3aHGRf5zyi4GukbsNkH7Lao1uhwBSLk4e0MYffIp2JnH06vSYz6LW10WuXVv6j yUfSIoQysc2ZCEG6gk0yUFmUhSVjVepaQI7c1wdknJD+pPwLwClI2mOP5Ng//PLLEi19 ntYExihBoXhlk5y787m+jfe/XsTXRU1XQbpbqMeidnF0Xf00PSdoYcUBpBlkSR5HV0dc mLAt1Z/obc8cpu7xdtMIrcIH10+JY2bjDSiwQqCEzhLru/oRlddKZx+Z4W0fKR8e9rTj J2alOna6X47KymFEej4rJD8HArD5n33evDofsAks6rC6sl/IHmNdtk8RW3nwKKSHzv9r wunA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: APt69E0eNH9awLG+8E2Hl2iPnZZOoyiQGPEwI8KYbaUep3DqfpE1vGd9 zL0N60kZP2Qb5S0WHEhraZdL1MCpaCSBDidjnNGlCuPnRq0EvKm2WhqpTdg7aaqzJkfx0OLv72I AXrfyqU/xc3mGCMVqoDlTgXOrAA5ebyzZGqsqChMYiruO4B4UdIFCbsWt6xCENu2v7g== X-Received: by 2002:a37:678b:: with SMTP id b133-v6mr8695650qkc.54.1528547707732; Sat, 09 Jun 2018 05:35:07 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJeJ91XsTvEkpUYFfi1ZHW8IoomKYyEErIhUfK0C5xhyUxXQBY3JNb0M1pg1otJ9uI7FItX X-Received: by 2002:a37:678b:: with SMTP id b133-v6mr8695621qkc.54.1528547707200; Sat, 09 Jun 2018 05:35:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528547707; cv=none; d=google.com; s=arc-20160816; b=V5mhRSBzF97winEDsAJP1iC5FtoWRgHuYF8RBO7XOMlEFrSvjV8WnfAPgjuQnPuIX3 bzzvlgWahVncOZL2bParc7y63i7d8RYnN1SSVFnH4tHVUWXQLHL0nXXi8lxOxbuhibI1 6bl4kmbU4NViXYe8IZWi9JXI2XzBkRJcdm+dL2osgODBJg0gRaRicH+iEfyhQBb+cJW7 GpixCf8SJWX2SdRbxmgQg37voTh8v7SeKvDu81fC7zorTo8JfzYSKNGfagd3vU+udPTT 0mFcgvJ7L5mUVcAvC7zaF6PbVgBGgjELGwPjCjCPo0A/EaDTRT44T4+hBEtX/N7pPxki UaLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=qiIuc4Jrd5OMq+JvJamUY4gVFhwrKuhLKXdj7pDQD1M=; b=qELKxm3xxHIRHwuezvam3cOMwpQyiGU1HZ6y4b22ylG209CL4d8jDgPFIyOl9sJQDL ft1TEDoJpddNnVOg6+Km05+GOqaODUjF5HSMRnWDDh378Zbzo889CnSLjHwc7kPeJE9J FV5BjeYMw49VIzyJiJsT4eADSDWYYgXH4SkaN8W3ETDTxpB36VlgoDAfW+OffXIdX5xu 3tq+XmaSzFKQdrToj/7RI+9KsGNPaSFHIuogHwfLeI6cc/Bk4utmJJSsyLlV6tPm7Y39 jMXl5dhKUP4B518q5x2G5nRtjNSiH7aYUkO2V/EbIDRg+F+210SEKranMrkKJY+tmtYt 7yYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx3-rdu2.redhat.com. [66.187.233.73]) by mx.google.com with ESMTPS id t1-v6si7769934qtb.341.2018.06.09.05.35.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Jun 2018 05:35:07 -0700 (PDT) Received-SPF: pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) client-ip=66.187.233.73; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CCE2A406F8B8; Sat, 9 Jun 2018 12:35:06 +0000 (UTC) Received: from localhost (ovpn-12-40.pek2.redhat.com [10.72.12.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC1922023488; Sat, 9 Jun 2018 12:35:01 +0000 (UTC) From: Ming Lei To: Jens Axboe , Christoph Hellwig , Alexander Viro , Kent Overstreet Cc: David Sterba , Huang Ying , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o , "Darrick J . Wong" , Coly Li , Filipe Manana , Randy Dunlap , Ming Lei Subject: [PATCH V6 24/30] xfs: conver to bio_for_each_chunk_segment_all Date: Sat, 9 Jun 2018 20:30:08 +0800 Message-Id: <20180609123014.8861-25-ming.lei@redhat.com> In-Reply-To: <20180609123014.8861-1-ming.lei@redhat.com> References: <20180609123014.8861-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sat, 09 Jun 2018 12:35:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sat, 09 Jun 2018 12:35:06 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ming.lei@redhat.com' RCPT:'' X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP bio_for_each_page_all() can't be used any more after multipage bvec is enabled, so we have to convert to bio_for_each_chunk_segment_all(). Given bvec can't be changed under bio_for_each_chunk_segment_all(), this patch marks the bvec parameter as 'const' for xfs_finish_page_writeback(). Signed-off-by: Ming Lei --- fs/xfs/xfs_aops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index ca6903726689..c134db97911d 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -107,7 +107,7 @@ xfs_find_daxdev_for_inode( static void xfs_finish_page_writeback( struct inode *inode, - struct bio_vec *bvec, + const struct bio_vec *bvec, int error) { struct buffer_head *head = page_buffers(bvec->bv_page), *bh = head; @@ -169,6 +169,7 @@ xfs_destroy_ioend( for (bio = &ioend->io_inline_bio; bio; bio = next) { struct bio_vec *bvec; int i; + struct bvec_chunk_iter citer; /* * For the last bio, bi_private points to the ioend, so we @@ -180,7 +181,7 @@ xfs_destroy_ioend( next = bio->bi_private; /* walk each page on bio, ending page IO on them */ - bio_for_each_segment_all(bvec, bio, i) + bio_for_each_chunk_segment_all(bvec, bio, i, citer) xfs_finish_page_writeback(inode, bvec, error); bio_put(bio);