xfs: remove restrictions for fsdax and reflink
authorShiyang Ruan <ruansy.fnst@fujitsu.com>
Thu, 1 Dec 2022 15:32:53 +0000 (15:32 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 12 Dec 2022 02:12:17 +0000 (18:12 -0800)
Since the basic function for fsdax and reflink has been implemented,
remove the restrictions of them for widly test.

Link: https://lkml.kernel.org/r/1669908773-207-1-git-send-email-ruansy.fnst@fujitsu.com
Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_iops.c

index 1f783e9..13f1b2a 100644 (file)
@@ -1138,10 +1138,6 @@ xfs_ioctl_setattr_xflags(
        if ((fa->fsx_xflags & FS_XFLAG_REALTIME) && xfs_is_reflink_inode(ip))
                ip->i_diflags2 &= ~XFS_DIFLAG2_REFLINK;
 
-       /* Don't allow us to set DAX mode for a reflinked file for now. */
-       if ((fa->fsx_xflags & FS_XFLAG_DAX) && xfs_is_reflink_inode(ip))
-               return -EINVAL;
-
        /* diflags2 only valid for v3 inodes. */
        i_flags2 = xfs_flags2diflags2(ip, fa->fsx_xflags);
        if (i_flags2 && !xfs_has_v3inodes(mp))
index 2e10e1c..bf0495f 100644 (file)
@@ -1185,10 +1185,6 @@ xfs_inode_supports_dax(
        if (!S_ISREG(VFS_I(ip)->i_mode))
                return false;
 
-       /* Only supported on non-reflinked files. */
-       if (xfs_is_reflink_inode(ip))
-               return false;
-
        /* Block size must match page size */
        if (mp->m_sb.sb_blocksize != PAGE_SIZE)
                return false;