From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:52176 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755792AbdDGR3x (ORCPT ); Fri, 7 Apr 2017 13:29:53 -0400 Date: Fri, 7 Apr 2017 13:29:44 -0400 From: Brian Foster Subject: Re: [PATCH v2] xfs: actually report xattr extents via iomap Message-ID: <20170407172944.GC55851@bfoster.bfoster> References: <20170407172540.GK4864@birch.djwong.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170407172540.GK4864@birch.djwong.org> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: "Darrick J. Wong" Cc: xfs , Eryu Guan , Christoph Hellwig , Eric Sandeen 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 > --- Reviewed-by: Brian Foster > 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; > }