fs/xfs/scrub/orphanage.h

Source file repositories/reference/linux-study-clean/fs/xfs/scrub/orphanage.h

File Facts

System
Linux kernel
Corpus path
fs/xfs/scrub/orphanage.h
Extension
.h
Size
2362 bytes
Lines
87
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 xrep_adoption {
	struct xfs_scrub	*sc;

	/* Name used for the adoption. */
	struct xfs_name		*xname;

	/* Parent pointer context tracking */
	struct xfs_parent_args	ppargs;

	/* Block reservations for orphanage and child (if directory). */
	unsigned int		orphanage_blkres;
	unsigned int		child_blkres;

	/*
	 * Does the caller want us to bump the child link count?  This is not
	 * needed when reattaching files that have become disconnected but have
	 * nlink > 1.  It is necessary when changing the directory tree
	 * structure.
	 */
	bool			bump_child_nlink:1;
};

bool xrep_orphanage_can_adopt(struct xfs_scrub *sc);

int xrep_adoption_trans_alloc(struct xfs_scrub *sc,
		struct xrep_adoption *adopt);
int xrep_adoption_compute_name(struct xrep_adoption *adopt,
		struct xfs_name *xname);
int xrep_adoption_move(struct xrep_adoption *adopt);
int xrep_adoption_trans_roll(struct xrep_adoption *adopt);
#else
struct xrep_adoption { /* empty */ };
# define xrep_orphanage_rele(sc)	((void)0)
#endif /* CONFIG_XFS_ONLINE_REPAIR */

#endif /* __XFS_SCRUB_ORPHANAGE_H__ */

Annotation

Implementation Notes