From patchwork Wed May 23 14:43:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10421593 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 74FF360545 for ; Wed, 23 May 2018 14:45:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65F2B287B4 for ; Wed, 23 May 2018 14:45:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A41928865; Wed, 23 May 2018 14:45:26 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=unavailable 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 00F5A287E9 for ; Wed, 23 May 2018 14:45:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E8F666B0275; Wed, 23 May 2018 10:45:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DEE5B6B0276; Wed, 23 May 2018 10:45:00 -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 C6B716B0277; Wed, 23 May 2018 10:45:00 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f71.google.com (mail-pl0-f71.google.com [209.85.160.71]) by kanga.kvack.org (Postfix) with ESMTP id 7E5A56B0275 for ; Wed, 23 May 2018 10:45:00 -0400 (EDT) Received: by mail-pl0-f71.google.com with SMTP id bd7-v6so14343918plb.20 for ; Wed, 23 May 2018 07:45:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=27hnClfbDMc/KvcEuSvBw4ACOspeLoR933PdxXUe6jM=; b=iQdkKWtyJteZULBcSiT+rVIrWG0vs/wHOIVm3n/3FHXUrh5S7VC3YgytPWLr9O+VNB L2V7O4XFSjjkaDMTD2zVPg3let5uLNc2nmk3GUJnWjhPrLLGHNNeRpmG/ktNMHza79t8 P57GV0n9BMLHeitwXgS7tErXUI0T1/j1WRKTaJsc4NrhhY4oU6Rzlv0ql705k9AQTWO8 WdfEecQdYltrFdlaNObWMeJT0v/4t80XvkrQxLzhbr51ewJMbZFRlvKrdRTK87N2jY/1 GOh3XZmZmD0sMt1YdhXIuT8+jZcnHK50QdlzN7zTK1Vj+QBk9KkMuLjhFzUXDxTGCgl1 0fBQ== X-Gm-Message-State: ALKqPwehTwIY8klQKsqIv4Lt2BQwbLfPqDQMDCRtBGGFuqZOBg7cyoeL nsnBBEt1xQIlnoncLWMiU6QKcCPzWpWU2KFlZ2g5BV9RMydQmjwAX3YCx4BVUmCFTL0GJBhKCyu Z0+MAVoVy7xmV7ftLjNk+S7SKoTWsO7bTtUOrQD69ufLxpbYUKENzsI4EVuNl+os= X-Received: by 2002:a65:4443:: with SMTP id e3-v6mr2629580pgq.348.1527086700221; Wed, 23 May 2018 07:45:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpTTEjFhYtXzwHT/4ZfiOMJmYpcVaNgxUHoNJl0fyJ7nfeGNXqvcIqdB3cBf0P+OWlJVl+R X-Received: by 2002:a65:4443:: with SMTP id e3-v6mr2629545pgq.348.1527086699500; Wed, 23 May 2018 07:44:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527086699; cv=none; d=google.com; s=arc-20160816; b=hoAIWyeJ4rNhb58l6+fzQbNwb5N02mKbj7/wDrqbtjkhr3LIiVZ6z37zceSaSMZKiz 7qu9kQGGtqUyhDaPS6HTa6GAyr1ZI110loFa7hadh6spj4QJrrCxn2cb4JxueiTeEJas g2CaNP4m5C8Eq7a3PoZAA9dg4KNgjL8684BCEZSAw4ic+ED+dxXY8ruQpI/L1gVsEWXd U7fqFPNxPu3b5E2ycimtH5KC6BupTYm21v0//j9cdrinacLS0GeL0rygNYgWaZ02PlAS hz4mRDCyDczIEdDOeSyA+3Afpib8M5LyJpVjCGZV7n+iSFOeYNo2FagzBUCnQSel8sgZ GXGQ== 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 :dkim-signature:arc-authentication-results; bh=27hnClfbDMc/KvcEuSvBw4ACOspeLoR933PdxXUe6jM=; b=H12BFxG1+MqhSdKTGnxpyhzpJL76sCzXahMs0NAM4blt1X3H0VEKemsvpq75fJmRK2 st584VUIdHW+CerfpHPP0rIMD+MAUUbE7GySV/ElgT+q2AX8WJI1ufzVAzcWediBTTes FqayXucAaKrXQSgw/IQGQ4b1xmN5JSQsXvb4oh7xsvSnf7iKk9XkfLkK4oGoXRgLHtXf zw+IcvS0ZImhe8y9i/jVUDBTo3NbxduHkrlKHrwuaYkSW9XKFUaH5seonM/7f60ogjjB cqekiBQeUDxei52ItuvR5bGzrZK2B3HDTTUGlCSDP9UWVhHL4aCeoMIMS68BNrsR8glh JdKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=pN5fh0vL; spf=pass (google.com: best guess record for domain of batv+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id w22-v6si18130697pll.599.2018.05.23.07.44.59 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 07:44:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of batv+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=pN5fh0vL; spf=pass (google.com: best guess record for domain of batv+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=27hnClfbDMc/KvcEuSvBw4ACOspeLoR933PdxXUe6jM=; b=pN5fh0vLqnv/2z9lOYJY5CEzm KUrH5ghZqfR696vlbitgdnrivqQ8lwIAp4A0hjQpKyNY9wi4QUOGdhtKwLY9pOoV3dG8f8Guvzhdb Eh746Pvn9+aVnwIspoX+wgnTq1niEta1rODswwPrnTcNV0hMBELhmRMT/0ValEljAzEJqvNM5oF58 lBBRalAUR/fCIlQ3SQp1Mc/2OrqUUseiQoOTm1E4FVobKn6LD3joEvV70xlh+wWeGrKr4/wmBnJr0 rXvsW6wyk3iVFu4xKfjBnVUrzCicSfSyKAbjFdsXGosZIBm5+G5uNYQO3JSrf4WhAWur7yswqp42t AiXxrpL7g==; Received: from 089144199016.atnat0008.highway.a1.net ([89.144.199.16] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLV0X-0000S0-3h; Wed, 23 May 2018 14:44:53 +0000 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 17/34] xfs: use iomap_bmap Date: Wed, 23 May 2018 16:43:40 +0200 Message-Id: <20180523144357.18985-18-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180523144357.18985-1-hch@lst.de> References: <20180523144357.18985-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 Switch to the iomap based bmap implementation to get rid of one of the last users of xfs_get_blocks. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_aops.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 80de476cecf8..56e405572909 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -1378,10 +1378,9 @@ xfs_vm_bmap( struct address_space *mapping, sector_t block) { - struct inode *inode = (struct inode *)mapping->host; - struct xfs_inode *ip = XFS_I(inode); + struct xfs_inode *ip = XFS_I(mapping->host); - trace_xfs_vm_bmap(XFS_I(inode)); + trace_xfs_vm_bmap(ip); /* * The swap code (ab-)uses ->bmap to get a block mapping and then @@ -1394,9 +1393,7 @@ xfs_vm_bmap( */ if (xfs_is_reflink_inode(ip) || XFS_IS_REALTIME_INODE(ip)) return 0; - - filemap_write_and_wait(mapping); - return generic_block_bmap(mapping, block, xfs_get_blocks); + return iomap_bmap(mapping, block, &xfs_iomap_ops); } STATIC int