Message ID | 20200312142235.550766-4-hch@lst.de (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [1/5] xfs: add a new xfs_sb_version_has_large_dinode helper | expand |
On Thu, Mar 12, 2020 at 03:22:33PM +0100, Christoph Hellwig wrote: > Only v5 file systems can have the reflink feature, and those will > always use the large dinode format. Remove the extra check for the > inode version. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- Reviewed-by: Brian Foster <bfoster@redhat.com> > fs/xfs/xfs_ioctl.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c > index 5a1d2b9cb05a..ad825ffa7e4c 100644 > --- a/fs/xfs/xfs_ioctl.c > +++ b/fs/xfs/xfs_ioctl.c > @@ -1473,8 +1473,7 @@ xfs_ioctl_setattr_check_cowextsize( > if (!(fa->fsx_xflags & FS_XFLAG_COWEXTSIZE)) > return 0; > > - if (!xfs_sb_version_hasreflink(&ip->i_mount->m_sb) || > - ip->i_d.di_version != 3) > + if (!xfs_sb_version_hasreflink(&ip->i_mount->m_sb)) > return -EINVAL; > > if (fa->fsx_cowextsize == 0) > -- > 2.24.1 >
On Thursday, March 12, 2020 7:52 PM Christoph Hellwig wrote: > Only v5 file systems can have the reflink feature, and those will > always use the large dinode format. Remove the extra check for the > inode version. > I don't see any logical issues. Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com> > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > fs/xfs/xfs_ioctl.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c > index 5a1d2b9cb05a..ad825ffa7e4c 100644 > --- a/fs/xfs/xfs_ioctl.c > +++ b/fs/xfs/xfs_ioctl.c > @@ -1473,8 +1473,7 @@ xfs_ioctl_setattr_check_cowextsize( > if (!(fa->fsx_xflags & FS_XFLAG_COWEXTSIZE)) > return 0; > > - if (!xfs_sb_version_hasreflink(&ip->i_mount->m_sb) || > - ip->i_d.di_version != 3) > + if (!xfs_sb_version_hasreflink(&ip->i_mount->m_sb)) > return -EINVAL; > > if (fa->fsx_cowextsize == 0) >
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 5a1d2b9cb05a..ad825ffa7e4c 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -1473,8 +1473,7 @@ xfs_ioctl_setattr_check_cowextsize( if (!(fa->fsx_xflags & FS_XFLAG_COWEXTSIZE)) return 0; - if (!xfs_sb_version_hasreflink(&ip->i_mount->m_sb) || - ip->i_d.di_version != 3) + if (!xfs_sb_version_hasreflink(&ip->i_mount->m_sb)) return -EINVAL; if (fa->fsx_cowextsize == 0)
Only v5 file systems can have the reflink feature, and those will always use the large dinode format. Remove the extra check for the inode version. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/xfs/xfs_ioctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)