From patchwork Thu May 31 18:06:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10441713 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 AED13602BF for ; Thu, 31 May 2018 18:07:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C5E028E05 for ; Thu, 31 May 2018 18:07:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90D0F28F91; Thu, 31 May 2018 18:07:10 +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 3AB0128E05 for ; Thu, 31 May 2018 18:07:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2F3AC6B0277; Thu, 31 May 2018 14:07:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2828B6B0278; Thu, 31 May 2018 14:07: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 0F7596B0279; Thu, 31 May 2018 14:07:00 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg0-f69.google.com (mail-pg0-f69.google.com [74.125.83.69]) by kanga.kvack.org (Postfix) with ESMTP id B71A66B0277 for ; Thu, 31 May 2018 14:06:59 -0400 (EDT) Received: by mail-pg0-f69.google.com with SMTP id f6-v6so6553481pgs.13 for ; Thu, 31 May 2018 11:06:59 -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=NmxaO+BqhRRjPE//pdjkwU2ffA/NFawTEFJ/1QK9ks8=; b=Us8FgjJxxifaCr9vREHw4+/M/pjeHrzAEYdQzcWayuewCrA750HvzDPFMHMLEZ50gd aAyava/AVd8zPCOKY9h0C3pkQGCxp7AJCo1qZR1t6OOR+0OzE4xqHT+BoX08d3lYye6b HwY8lB22ihll191p2+Lff0kXaQANACacCQpRDUM6GQ/lwFIslf+SyVOBhxfEivQ9CKn7 ZnM9QgeNGDb0zw8aajQ3HxNmA7RZ+fL+lhTAboQLyfZ3xuPxQkWbmbpzs8UIfY4JRb+p gr/19MgWAbA7Mn13rdcQspkCtbIB+FhnsTsGckicKi5PB4xRYsjlknthKj1sGiaHX4lh Oq6A== X-Gm-Message-State: ALKqPwdnSlLacdwrSVTIVUX6bSpGb2mt3wAkgvGIJCUKL+N/Yn0NlO8T /NcRuVsFBDG8hzUfgofD9cdkLiimAv9D0BNfWCOdD7wig9vsTiXUeEG0+u92C6FiHhyEMoYKhf/ p3SLFQNTgWQZbM5ZSziPIUG0jM1STyxxKKvJrafJq+Ev17DRd9h2+0m/2boxLddg= X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr7843265plt.288.1527790019450; Thu, 31 May 2018 11:06:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIESWRQ5MHDxksCHbFuXDlLhvnSgbllWJtDxIyfvSje4JTihgwD5sXC1vdWr+ADNwKBlHhr X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr7843217plt.288.1527790018479; Thu, 31 May 2018 11:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527790018; cv=none; d=google.com; s=arc-20160816; b=PAU1WMvDcfAEGN7IB2AAMgzMEN1OEpOle9ftbEbSTSDJXTGfNiKL/QnyFzE+IysndY QudMLOTv2KCHR4mowjTuOvzUnP9hen81n54RUXIu5PrhHN5r+PGHEKKB75uBTuPzzuFN CCkdpdJLqunjY3uGM83dojCnlrilPyNUtdC6dWQypZ8X+C1PXJKoAdYEDTYCc4UykNhy +vVMdmKtTl1oM3dGrzPbwy4G0Ffw/t9LnE8qtF4ZAge8sYFZLLqWos+G4VAsGDHZFSg5 i4/yomnY6YH2DXF1VM08E8+DsgYgH7STwFKVPydKeNIS14y6ykVznMXxX67lI14CHqlj tUpw== 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=NmxaO+BqhRRjPE//pdjkwU2ffA/NFawTEFJ/1QK9ks8=; b=c6owSw81sK7yDoj1Tf/2aTlmMAmPgCQc+RQkkcFfG20goiz+zbwxXarIOWMqAiTvI3 NehBO+FhCNrVbU6gDBIAPMCOPmagsQ/T5NbKwWUYfO8XAJJHkzzYj0nGMytDbh/Xl70l ynwNvBPcW/oyaOgAwpSzfRr1hzU5ZmiC+xgyF5ATpSivTua4rsFUBlWSbwCP/85FcpQb i1Ies/cLjj9lCoobIoB2UYR+6bYsmKZcZ5pkMpqxOkbhJ99wac5wb4M0wMn51H5kJsOb 26y/LAVhttwv2yyNZdvj4fv2ppH0vy91HgkQeM56Yyhefkr+7kMfCxxI+WLXJt9Zy42u mdug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=seQJDukC; spf=pass (google.com: best guess record for domain of batv+67dfbb8f664e29ec4bbc+5394+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+67dfbb8f664e29ec4bbc+5394+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 f39-v6si37018768plb.572.2018.05.31.11.06.58 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 May 2018 11:06:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of batv+67dfbb8f664e29ec4bbc+5394+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=seQJDukC; spf=pass (google.com: best guess record for domain of batv+67dfbb8f664e29ec4bbc+5394+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+67dfbb8f664e29ec4bbc+5394+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=NmxaO+BqhRRjPE//pdjkwU2ffA/NFawTEFJ/1QK9ks8=; b=seQJDukCTRlCPyuYHsf3uTY1I jiE48D+Rseq/wzHvrCuuUF86qjfjOX7doDKboMfViyqTKO6YesMECp2AyZXqQN/sR2jCy6pnAY71i JYE2NlRaP/zs/6Dn5SW1dimxEp3QVFE9X4Irg7NIKEtXczkPwpIuBa5Fa5PcUsaDujADveaBUrOI+ U25RVYEP+2v5RYCpKS5ao+Gw7JXx4QINp2QqzQVXwUokVmQBIDInMlz3nEqXpuhfsZkZkGJvTjJ4E P9NqGFUqxGSq3p8wyu6ru+UtsxUpfq9SSHsHRTFKq5WzRBzDjJtw5UQTejS7swtmcbhCfeEWGvErs WBYLqK4NQ==; Received: from 213-225-38-123.nat.highway.a1.net ([213.225.38.123] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fORyT-0003Tj-Ft; Thu, 31 May 2018 18:06:57 +0000 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 12/13] xfs: use iomap_bmap Date: Thu, 31 May 2018 20:06:13 +0200 Message-Id: <20180531180614.21506-13-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180531180614.21506-1-hch@lst.de> References: <20180531180614.21506-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: Dave Chinner 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