diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2016-08-03 12:18:07 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-08-03 12:18:07 +1000 |
commit | 2b0eeb5e74ced62a94b01c65ddec9be7e5edcea1 (patch) | |
tree | 34030028465536b67d6df02283dc8b0af5524ffb /fs/xfs | |
parent | a650e8f98e5d9df8a5866d73aa9a796601f1abfc (diff) | |
download | linux-2b0eeb5e74ced62a94b01c65ddec9be7e5edcea1.tar.bz2 |
xfs: disable XFS_IOC_SWAPEXT when rmap btree is enabled
Swapping extents between two inodes requires the owner to be updated
in the rmap tree for all the extents that are swapped. This code
does not yet exist, so switch off the XFS_IOC_SWAPEXT ioctl until
support has been implemented. This will need to be done before the
rmap btree code can have the experimental tag removed.
This functionality will be provided in a (much) later patch, using
some of the reflink deferred block remapping functionality to
accomlish extent swapping with rmap updates.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index a819d7baa346..4ece4f2ffc72 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c @@ -1535,6 +1535,10 @@ xfs_swap_extents( __uint64_t tmp; int lock_flags; + /* XXX: we can't do this with rmap, will fix later */ + if (xfs_sb_version_hasrmapbt(&mp->m_sb)) + return -EOPNOTSUPP; + tempifp = kmem_alloc(sizeof(xfs_ifork_t), KM_MAYFAIL); if (!tempifp) { error = -ENOMEM; |