fs/xfs/libxfs/xfs_dir2.h

Source file repositories/reference/linux-study-clean/fs/xfs/libxfs/xfs_dir2.h

File Facts

System
Linux kernel
Corpus path
fs/xfs/libxfs/xfs_dir2.h
Extension
.h
Size
10879 bytes
Lines
359
Domain
Core OS
Bucket
VFS And Filesystem Core
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct xfs_dir_update_params {
	const struct xfs_inode	*dp;
	const struct xfs_inode	*ip;
	const struct xfs_name	*name;
	int			delta;
};

#ifdef CONFIG_XFS_LIVE_HOOKS
void xfs_dir_update_hook(struct xfs_inode *dp, struct xfs_inode *ip,
		int delta, const struct xfs_name *name);

struct xfs_dir_hook {
	struct xfs_hook		dirent_hook;
};

void xfs_dir_hook_disable(void);
void xfs_dir_hook_enable(void);

int xfs_dir_hook_add(struct xfs_mount *mp, struct xfs_dir_hook *hook);
void xfs_dir_hook_del(struct xfs_mount *mp, struct xfs_dir_hook *hook);
void xfs_dir_hook_setup(struct xfs_dir_hook *hook, notifier_fn_t mod_fn);
#else
# define xfs_dir_update_hook(dp, ip, delta, name)	((void)0)
#endif /* CONFIG_XFS_LIVE_HOOKS */

struct xfs_parent_args;

struct xfs_dir_update {
	struct xfs_inode	*dp;
	const struct xfs_name	*name;
	struct xfs_inode	*ip;
	struct xfs_parent_args	*ppargs;
};

int xfs_dir_create_child(struct xfs_trans *tp, unsigned int resblks,
		struct xfs_dir_update *du);
int xfs_dir_add_child(struct xfs_trans *tp, unsigned int resblks,
		struct xfs_dir_update *du);
int xfs_dir_remove_child(struct xfs_trans *tp, unsigned int resblks,
		struct xfs_dir_update *du);

int xfs_dir_exchange_children(struct xfs_trans *tp, struct xfs_dir_update *du1,
		struct xfs_dir_update *du2, unsigned int spaceres);
int xfs_dir_rename_children(struct xfs_trans *tp, struct xfs_dir_update *du_src,
		struct xfs_dir_update *du_tgt, unsigned int spaceres,
		struct xfs_dir_update *du_wip);

#endif	/* __XFS_DIR2_H__ */

Annotation

Implementation Notes