From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp2130.oracle.com ([156.151.31.86]:41958 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727242AbeLERiG (ORCPT ); Wed, 5 Dec 2018 12:38:06 -0500 Date: Wed, 5 Dec 2018 09:37:55 -0800 From: "Darrick J. Wong" To: Carlos Maiolino Cc: linux-fsdevel@vger.kernel.org, hch@lst.de, adilger@dilger.ca, sandeen@redhat.com, david@fromorbit.com Subject: Re: [PATCH 10/10] xfs: Get rid of ->bmap Message-ID: <20181205173755.GB8112@magnolia> References: <20181205091728.29903-1-cmaiolino@redhat.com> <20181205091728.29903-11-cmaiolino@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181205091728.29903-11-cmaiolino@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Dec 05, 2018 at 10:17:28AM +0100, Carlos Maiolino wrote: > We don't need ->bmap anymore, only usage for it was FIBMAP, which is now > gone. > > Signed-off-by: Carlos Maiolino > --- > fs/xfs/xfs_aops.c | 24 ------------------------ > fs/xfs/xfs_trace.h | 1 - > 2 files changed, 25 deletions(-) > > diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c > index 338b9d9984e0..26f5bb80d007 100644 > --- a/fs/xfs/xfs_aops.c > +++ b/fs/xfs/xfs_aops.c > @@ -963,29 +963,6 @@ xfs_vm_releasepage( > return iomap_releasepage(page, gfp_mask); > } > > -STATIC sector_t > -xfs_vm_bmap( > - struct address_space *mapping, > - sector_t block) > -{ > - struct xfs_inode *ip = XFS_I(mapping->host); > - > - trace_xfs_vm_bmap(ip); > - > - /* > - * The swap code (ab-)uses ->bmap to get a block mapping and then > - * bypasses the file system for actual I/O. We really can't allow > - * that on reflinks inodes, so we have to skip out here. And yes, > - * 0 is the magic code for a bmap error. > - * > - * Since we don't pass back blockdev info, we can't return bmap > - * information for rt files either. > - */ > - if (xfs_is_reflink_inode(ip) || XFS_IS_REALTIME_INODE(ip)) > - return 0; > - return iomap_bmap(mapping, block, &xfs_iomap_ops); If you're going to delete this, you might as well kill iomap_bmap too since xfs is the only user of it. --D > -} > - > STATIC int > xfs_vm_readpage( > struct file *unused, > @@ -1024,7 +1001,6 @@ const struct address_space_operations xfs_address_space_operations = { > .set_page_dirty = iomap_set_page_dirty, > .releasepage = xfs_vm_releasepage, > .invalidatepage = xfs_vm_invalidatepage, > - .bmap = xfs_vm_bmap, > .direct_IO = noop_direct_IO, > .migratepage = iomap_migrate_page, > .is_partially_uptodate = iomap_is_partially_uptodate, > diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h > index 3043e5ed6495..d836b9b84aae 100644 > --- a/fs/xfs/xfs_trace.h > +++ b/fs/xfs/xfs_trace.h > @@ -618,7 +618,6 @@ DEFINE_INODE_EVENT(xfs_readdir); > #ifdef CONFIG_XFS_POSIX_ACL > DEFINE_INODE_EVENT(xfs_get_acl); > #endif > -DEFINE_INODE_EVENT(xfs_vm_bmap); > DEFINE_INODE_EVENT(xfs_file_ioctl); > DEFINE_INODE_EVENT(xfs_file_compat_ioctl); > DEFINE_INODE_EVENT(xfs_ioctl_setattr); > -- > 2.17.2 >