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.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
xfs_da_format.hxfs_da_btree.h
Detected Declarations
struct xfs_da_argsstruct xfs_inodestruct xfs_mountstruct xfs_transstruct xfs_dir2_sf_hdrstruct xfs_dir2_sf_entrystruct xfs_dir2_data_hdrstruct xfs_dir2_data_entrystruct xfs_dir2_data_unusedstruct xfs_dir3_icfree_hdrstruct xfs_dir3_icleaf_hdrstruct xfs_dir_update_paramsstruct xfs_dir_hookstruct xfs_parent_argsstruct xfs_dir_updateenum xfs_dir2_fmtfunction xfs_dir2_samenamefunction xfs_dir2_dataptr_to_bytefunction xfs_dir2_byte_to_dataptrfunction tofunction xfs_dir2_dataptr_to_dbfunction xfs_dir2_byte_to_offfunction xfs_dir2_dataptr_to_offfunction xfs_dir2_db_off_to_bytefunction blockfunction tofunction xfs_dir2_db_off_to_dataptrfunction blockfunction blockfunction xfs_dir2_block_tail_pfunction xfs_dir2_leaf_tail_pfunction xfs_ascii_ci_need_xfrmfunction xfs_ascii_ci_xfrm
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
- Immediate include surface: `xfs_da_format.h`, `xfs_da_btree.h`.
- Detected declarations: `struct xfs_da_args`, `struct xfs_inode`, `struct xfs_mount`, `struct xfs_trans`, `struct xfs_dir2_sf_hdr`, `struct xfs_dir2_sf_entry`, `struct xfs_dir2_data_hdr`, `struct xfs_dir2_data_entry`, `struct xfs_dir2_data_unused`, `struct xfs_dir3_icfree_hdr`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.