xfs: add an explicit owner field to xfs_da_args
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:34 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:58:50 +0000 (14:58 -0700)
commit9eef772f3a194f6841850e45dacdf4207ec7da84
tree6b0acba499dbd7a067fc78ba9aa95d72a6873ffc
parentabf039e2e4afde98e448253f9a7ecc784a87924d
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>
13 files changed:
fs/xfs/libxfs/xfs_attr.c
fs/xfs/libxfs/xfs_attr_leaf.c
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_da_btree.h
fs/xfs/libxfs/xfs_dir2.c
fs/xfs/libxfs/xfs_exchmaps.c
fs/xfs/scrub/attr.c
fs/xfs/scrub/dabtree.c
fs/xfs/scrub/dir.c
fs/xfs/scrub/readdir.c
fs/xfs/xfs_attr_item.c
fs/xfs/xfs_dir2_readdir.c
fs/xfs/xfs_trace.h