1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (c) 2018-2024 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <djwong@kernel.org>
6 #ifndef __XFS_METAFILE_H__
7 #define __XFS_METAFILE_H__
9 /* All metadata files must have these flags set. */
10 #define XFS_METAFILE_DIFLAGS (XFS_DIFLAG_IMMUTABLE | \
12 XFS_DIFLAG_NOATIME | \
16 /* All metadata directories must have these flags set. */
17 #define XFS_METADIR_DIFLAGS (XFS_METAFILE_DIFLAGS | \
18 XFS_DIFLAG_NOSYMLINKS)
20 void xfs_metafile_set_iflag(struct xfs_trans
*tp
, struct xfs_inode
*ip
,
21 enum xfs_metafile_type metafile_type
);
22 void xfs_metafile_clear_iflag(struct xfs_trans
*tp
, struct xfs_inode
*ip
);
24 /* Code specific to kernel/userspace; must be provided externally. */
26 int xfs_trans_metafile_iget(struct xfs_trans
*tp
, xfs_ino_t ino
,
27 enum xfs_metafile_type metafile_type
, struct xfs_inode
**ipp
);
28 int xfs_metafile_iget(struct xfs_mount
*mp
, xfs_ino_t ino
,
29 enum xfs_metafile_type metafile_type
, struct xfs_inode
**ipp
);
31 #endif /* __XFS_METAFILE_H__ */