| To: | david@xxxxxxxxxxxxx, darrick.wong@xxxxxxxxxx |
|---|---|
| Subject: | [PATCH 047/119] xfs: disable XFS_IOC_SWAPEXT when rmap btree is enabled |
| From: | "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> |
| Date: | Thu, 16 Jun 2016 18:22:53 -0700 |
| Cc: | linux-fsdevel@xxxxxxxxxxxxxxx, vishal.l.verma@xxxxxxxxx, xfs@xxxxxxxxxxx, Dave Chinner <dchinner@xxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <146612627129.12839.3827886950949809165.stgit@xxxxxxxxxxxxxxxx> |
| References: | <146612627129.12839.3827886950949809165.stgit@xxxxxxxxxxxxxxxx> |
| User-agent: | StGit/0.17.1-dirty |
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.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
[darrick.wong@xxxxxxxxxx: fix extent swapping when rmap enabled]
Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
---
fs/xfs/xfs_bmap_util.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 450fd49..8666873 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -1618,6 +1618,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;
|
| Previous by Date: | [PATCH 046/119] xfs: add rmap btree block detection to log recovery, Darrick J. Wong |
|---|---|
| Next by Date: | [PATCH 048/119] xfs: don't update rmapbt when fixing agfl, Darrick J. Wong |
| Previous by Thread: | [PATCH 046/119] xfs: add rmap btree block detection to log recovery, Darrick J. Wong |
| Next by Thread: | [PATCH 048/119] xfs: don't update rmapbt when fixing agfl, Darrick J. Wong |
| Indexes: | [Date] [Thread] [Top] [All Lists] |