summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_exchmaps.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-04-15 14:54:34 -0700
committerDarrick J. Wong <djwong@kernel.org>2024-04-15 14:58:50 -0700
commit9eef772f3a194f6841850e45dacdf4207ec7da84 (patch)
tree6b0acba499dbd7a067fc78ba9aa95d72a6873ffc /fs/xfs/libxfs/xfs_exchmaps.c
parentabf039e2e4afde98e448253f9a7ecc784a87924d (diff)
downloadlinux-9eef772f3a194f6841850e45dacdf4207ec7da84.tar.gz
linux-9eef772f3a194f6841850e45dacdf4207ec7da84.tar.bz2
linux-9eef772f3a194f6841850e45dacdf4207ec7da84.zip
xfs: add an explicit owner field to xfs_da_args
Add an explicit owner field to xfs_da_args, which will make it easier for online fsck to set the owner field of the temporary directory and xattr structures that it builds to repair damaged metadata. Note: I hopefully found all the xfs_da_args definitions by looking for automatic stack variable declarations and xfs_da_args.dp assignments: git grep -E '(args.*dp =|struct xfs_da_args[[:space:]]*[a-z0-9][a-z0-9]*)' Note that callers of xfs_attr_{get,set,change} can set the owner to zero (or leave it unset) to have the default set to args->dp. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_exchmaps.c')
-rw-r--r--fs/xfs/libxfs/xfs_exchmaps.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_exchmaps.c b/fs/xfs/libxfs/xfs_exchmaps.c
index 7fa244228750..8d28e8cce5e9 100644
--- a/fs/xfs/libxfs/xfs_exchmaps.c
+++ b/fs/xfs/libxfs/xfs_exchmaps.c
@@ -429,6 +429,7 @@ xfs_exchmaps_attr_to_sf(
.geo = tp->t_mountp->m_attr_geo,
.whichfork = XFS_ATTR_FORK,
.trans = tp,
+ .owner = xmi->xmi_ip2->i_ino,
};
struct xfs_buf *bp;
int forkoff;
@@ -459,6 +460,7 @@ xfs_exchmaps_dir_to_sf(
.geo = tp->t_mountp->m_dir_geo,
.whichfork = XFS_DATA_FORK,
.trans = tp,
+ .owner = xmi->xmi_ip2->i_ino,
};
struct xfs_dir2_sf_hdr sfh;
struct xfs_buf *bp;