File Index
Files and directories
Sign in
FILE

xfs_metadir.h

File preview with syntax highlighting.

linux-6.19.14/fs/xfs/libxfs/xfs_metadir.h C
 1/* SPDX-License-Identifier: GPL-2.0-or-later */
 2/*
 3 * Copyright (c) 2018-2024 Oracle.  All Rights Reserved.
 4 * Author: Darrick J. Wong <djwong@kernel.org>
 5 */
 6#ifndef __XFS_METADIR_H__
 7#define __XFS_METADIR_H__
 8
 9/* Cleanup widget for metadata inode creation and deletion. */
10struct xfs_metadir_update {
11	/* Parent directory */
12	struct xfs_inode	*dp;
13
14	/* Path to metadata file */
15	const char		*path;
16
17	/* Parent pointer update context */
18	struct xfs_parent_args	*ppargs;
19
20	/* Child metadata file */
21	struct xfs_inode	*ip;
22
23	struct xfs_trans	*tp;
24
25	enum xfs_metafile_type	metafile_type;
26
27	unsigned int		dp_locked:1;
28	unsigned int		ip_locked:1;
29};
30
31int xfs_metadir_load(struct xfs_trans *tp, struct xfs_inode *dp,
32		const char *path, enum xfs_metafile_type metafile_type,
33		struct xfs_inode **ipp);
34
35int xfs_metadir_start_create(struct xfs_metadir_update *upd);
36int xfs_metadir_create(struct xfs_metadir_update *upd, umode_t mode);
37
38int xfs_metadir_start_link(struct xfs_metadir_update *upd);
39int xfs_metadir_link(struct xfs_metadir_update *upd);
40
41int xfs_metadir_commit(struct xfs_metadir_update *upd);
42void xfs_metadir_cancel(struct xfs_metadir_update *upd, int error);
43
44int xfs_metadir_mkdir(struct xfs_inode *dp, const char *path,
45		struct xfs_inode **ipp);
46
47#endif /* __XFS_METADIR_H__ */
~/ Read-only file preview.