From patchwork Fri May 25 03:46:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10426121 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 3B390602D8 for ; Fri, 25 May 2018 03:51:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29DAC295A6 for ; Fri, 25 May 2018 03:51:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E445295B3; Fri, 25 May 2018 03:51:32 +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 7F60D295A6 for ; Fri, 25 May 2018 03:51:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A4E516B02BC; Thu, 24 May 2018 23:51:30 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9D7EA6B02BE; Thu, 24 May 2018 23:51:30 -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 87A686B02BF; Thu, 24 May 2018 23:51:30 -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 567706B02BC for ; Thu, 24 May 2018 23:51:30 -0400 (EDT) Received: by mail-qt0-f198.google.com with SMTP id g12-v6so2790860qtj.22 for ; Thu, 24 May 2018 20:51:30 -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=XxHynV0iF4d3+VW6HXZSQqiqPX9X9IK2u+1EyRkvggI=; b=B0+JkxyfFmEuufRbUIzlsGUWq1TVSlKavym+znMxmsgCfORcIfm2+bTnPvwiENT/BM YIIKc0fwDVF3m3A0vb1X1FkMCwLWVLmWIlVPnuYNgUcM6Ky6U/Fpoa0QA1xBw2MZOA7w e62Y6AVWcm1Y6+yrlxLiUE9Lpxt5aNavfGSxfCYFsL4cugKDKSR70dkqFXXkdhkQ1Hww qltd5kazlgKd99IsNqAUq0P8uA0h8FwRFhJ3TTSnnXRfErVJhw7fHFFRnTHp1y8KzyTx JoaMBRm/DTOq9xez0kAvixcb5UfRKcb1kedp9uPcXr5GiA8TnEqdnKWeZM6MFn1C9mTX PdIA== 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: ALKqPwenpRHVVD4UQqfxv31C6ZCF5ZxHx2NJMWCX7xF/vdl2+Ga9zHqa u0i6gaqdX6Y9nf2YfruXciRuk1TZsE3EWW7BD7gfBo/TWb//r0/MEuD3wxQQrkx3Evw1JYRAkps iUyr6MiRcuRqTxh4XA/ySMZiiC3XCpHh/N6gjd7Fsp+LgWIczDKyY244Sk3WQJzfCLA== X-Received: by 2002:a37:9782:: with SMTP id z124-v6mr587795qkd.214.1527220290154; Thu, 24 May 2018 20:51:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLWDFwJEp6TQnk7fEPjpF29vJFDFQVzG0SxkMgaba5dTF80D5u8gqhOJ4jEwDA3JwRAR2MB X-Received: by 2002:a37:9782:: with SMTP id z124-v6mr587781qkd.214.1527220289650; Thu, 24 May 2018 20:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527220289; cv=none; d=google.com; s=arc-20160816; b=FbvHeO71GD0gbZSZj+7CXx5PsKBgVN1DoUQ9VnfncfOpzFvR97VoXTCQSfljlhiBk+ sTQzPj1gzMDzNDPGxJaKk3tJS8z5DbPEg7O7WOvPmXhO20bfh7fWDpDoRVntkz3EqS3+ tAXIqazj0oQGHcknkJZ7fUesYUZfO3ztvAjshTmSrDdiWGJ3THUAYyjUyHnk8kPNpqzY DDizoPBr48CKR7r4tFZlocam2m98SH9qg5i5PXAOldhx/hR65Rka0Bu0RBIkzjSYCW9K g5mLeccn3jNRUAeg18N+m2nHNUIK3DNXokFzidF+mVkNQruK3Av0EQJsCT71PtU/oh/D UmVQ== 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=XxHynV0iF4d3+VW6HXZSQqiqPX9X9IK2u+1EyRkvggI=; b=Z8Jg+o8JBTHJhWrcU1xWX+2Xus3vx16wd/xiZMwYPqCTjrF909BlYvMoxBQE0KN9hh uupPS7iBllm36ad1TxlLqaXKTEJJR1DumlDJwF4o2bRYguI5mx/UHuxaApkARVuVtQkY o9ufO08fxQbsMViv/RMIQx7+fUBsUTHgSa2T0hmDIe/24ndptEZyuHwjPrRuR/6tV1FE R5BqdxJD6zTJTFe0R739aFyjgxtqR9kbh354mRsFWMhdqUcqWJBoViWPr6vTAN2sk23J Grntt8RIhymzu2GcAHcluq0tmnTCjNkRZ20vIq98e4nBN99ldquwvQMJSY6tJHCT5pUL Qupg== 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 e31-v6si679522qve.100.2018.05.24.20.51.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 20:51:29 -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-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 456EDBB41D; Fri, 25 May 2018 03:51:29 +0000 (UTC) Received: from localhost (ovpn-12-30.pek2.redhat.com [10.72.12.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B9FC1002941; Fri, 25 May 2018 03:51:19 +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 , Ming Lei Subject: [RESEND PATCH V5 25/33] xfs: conver to bio_for_each_page_all2 Date: Fri, 25 May 2018 11:46:13 +0800 Message-Id: <20180525034621.31147-26-ming.lei@redhat.com> In-Reply-To: <20180525034621.31147-1-ming.lei@redhat.com> References: <20180525034621.31147-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 25 May 2018 03:51:29 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 25 May 2018 03:51:29 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.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_page_all2(). Given bvec can't be changed under bio_for_each_page_all2(), 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 13e2c167aec3..b5077eb4df51 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_iter_all bia; /* * 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_page_all(bvec, bio, i) + bio_for_each_page_all2(bvec, bio, i, bia) xfs_finish_page_writeback(inode, bvec, error); bio_put(bio);