Message ID | 20170407172540.GK4864@birch.djwong.org (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Fri, Apr 07, 2017 at 10:25:41AM -0700, Darrick J. Wong wrote: > Apparently FIEMAP for xattrs has been broken since we switched to > the iomap backend because of an incorrect check for xattr presence. > Also fix the broken locking. > > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> > --- Reviewed-by: Brian Foster <bfoster@redhat.com> > fs/xfs/xfs_iomap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c > index 009f824..b2f0901 100644 > --- a/fs/xfs/xfs_iomap.c > +++ b/fs/xfs/xfs_iomap.c > @@ -1170,10 +1170,10 @@ xfs_xattr_iomap_begin( > if (XFS_FORCED_SHUTDOWN(mp)) > return -EIO; > > - lockmode = xfs_ilock_data_map_shared(ip); > + lockmode = xfs_ilock_attr_map_shared(ip); > > /* if there are no attribute fork or extents, return ENOENT */ > - if (XFS_IFORK_Q(ip) || !ip->i_d.di_anextents) { > + if (!XFS_IFORK_Q(ip) || !ip->i_d.di_anextents) { > error = -ENOENT; > goto out_unlock; > } -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
I still think this isn't a feature we should support. For debug
we already have our xfs ioctl..
But if you want to keep it around:
Reviewed-by: Christoph Hellwig <hch@lst.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index 009f824..b2f0901 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -1170,10 +1170,10 @@ xfs_xattr_iomap_begin( if (XFS_FORCED_SHUTDOWN(mp)) return -EIO; - lockmode = xfs_ilock_data_map_shared(ip); + lockmode = xfs_ilock_attr_map_shared(ip); /* if there are no attribute fork or extents, return ENOENT */ - if (XFS_IFORK_Q(ip) || !ip->i_d.di_anextents) { + if (!XFS_IFORK_Q(ip) || !ip->i_d.di_anextents) { error = -ENOENT; goto out_unlock; }
Apparently FIEMAP for xattrs has been broken since we switched to the iomap backend because of an incorrect check for xattr presence. Also fix the broken locking. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> --- fs/xfs/xfs_iomap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html