| To: | david@xxxxxxxxxxxxx, darrick.wong@xxxxxxxxxx |
|---|---|
| Subject: | [PATCH 22/24] xfs: swap inode reflink flags when swapping inode extents |
| From: | "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> |
| Date: | Wed, 29 Jul 2015 15:35:19 -0700 |
| Cc: | xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20150729223258.17414.91354.stgit@xxxxxxxxxxxxxxxx> |
| References: | <20150729223258.17414.91354.stgit@xxxxxxxxxxxxxxxx> |
| User-agent: | StGit/0.17.1-dirty |
When we're swapping the extents of two inodes, be sure to swap the
reflink inode flag too.
Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
---
fs/xfs/xfs_bmap_util.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 349a5a6..7bdec90 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -1929,6 +1929,11 @@ xfs_swap_extents(
break;
}
+ if (xfs_is_reflink_inode(ip)) {
+ tip->i_d.di_flags2 |= XFS_DIFLAG2_REFLINK;
+ ip->i_d.di_flags2 &= ~XFS_DIFLAG2_REFLINK;
+ }
+
xfs_trans_log_inode(tp, ip, src_log_flags);
xfs_trans_log_inode(tp, tip, target_log_flags);
|
| Previous by Date: | [PATCH 19/24] xfs: add clone file and clone range ioctls, Darrick J. Wong |
|---|---|
| Next by Date: | [PATCH 21/24] xfs: teach fiemap about reflink'd extents, Darrick J. Wong |
| Previous by Thread: | [PATCH 19/24] xfs: add clone file and clone range ioctls, Darrick J. Wong |
| Next by Thread: | [PATCH 21/24] xfs: teach fiemap about reflink'd extents, Darrick J. Wong |
| Indexes: | [Date] [Thread] [Top] [All Lists] |