fs/xfs/xfs_trans_priv.h
Source file repositories/reference/linux-study-clean/fs/xfs/xfs_trans_priv.h
File Facts
- System
- Linux kernel
- Corpus path
fs/xfs/xfs_trans_priv.h- Extension
.h- Size
- 4620 bytes
- Lines
- 171
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct xlogstruct xfs_log_itemstruct xfs_mountstruct xfs_transstruct xfs_ailstruct xfs_log_vecstruct xfs_ail_cursorstruct xfs_ailfunction xfs_ail_minfunction xfs_trans_ail_updatefunction xfs_ail_pushfunction xfs_ail_push_allfunction xfs_ail_get_push_targetfunction xfs_ail_assign_tail_lsnfunction xfs_trans_ail_copy_lsnfunction xfs_trans_ail_copy_lsn
Annotated Snippet
struct xfs_ail_cursor {
struct list_head list;
struct xfs_log_item *item;
};
/*
* Private AIL structures.
*
* Eventually we need to drive the locking in here as well.
*/
struct xfs_ail {
struct xlog *ail_log;
struct task_struct *ail_task;
struct list_head ail_head;
struct list_head ail_cursors;
spinlock_t ail_lock;
xfs_lsn_t ail_last_pushed_lsn;
xfs_lsn_t ail_head_lsn;
int ail_log_flush;
unsigned long ail_opstate;
struct list_head ail_buf_list;
wait_queue_head_t ail_empty;
xfs_lsn_t ail_target;
};
/* Push all items out of the AIL immediately. */
#define XFS_AIL_OPSTATE_PUSH_ALL 0u
/*
* From xfs_trans_ail.c
*/
void xfs_trans_ail_update_bulk(struct xfs_ail *ailp,
struct xfs_ail_cursor *cur,
struct xfs_log_item **log_items, int nr_items,
xfs_lsn_t lsn) __releases(ailp->ail_lock);
/*
* Return a pointer to the first item in the AIL. If the AIL is empty, then
* return NULL.
*/
static inline struct xfs_log_item *
xfs_ail_min(
struct xfs_ail *ailp)
{
return list_first_entry_or_null(&ailp->ail_head, struct xfs_log_item,
li_ail);
}
static inline void
xfs_trans_ail_update(
struct xfs_ail *ailp,
struct xfs_log_item *lip,
xfs_lsn_t lsn) __releases(ailp->ail_lock)
{
xfs_trans_ail_update_bulk(ailp, NULL, &lip, 1, lsn);
}
void xfs_trans_ail_insert(struct xfs_ail *ailp, struct xfs_log_item *lip,
xfs_lsn_t lsn);
xfs_lsn_t xfs_ail_delete_one(struct xfs_ail *ailp, struct xfs_log_item *lip);
void xfs_ail_update_finish(struct xfs_ail *ailp, xfs_lsn_t old_lsn)
__releases(ailp->ail_lock);
void xfs_trans_ail_delete(struct xfs_log_item *lip, int shutdown_type);
static inline void xfs_ail_push(struct xfs_ail *ailp)
{
wake_up_process(ailp->ail_task);
}
static inline void xfs_ail_push_all(struct xfs_ail *ailp)
{
if (!test_and_set_bit(XFS_AIL_OPSTATE_PUSH_ALL, &ailp->ail_opstate))
xfs_ail_push(ailp);
}
static inline xfs_lsn_t xfs_ail_get_push_target(struct xfs_ail *ailp)
{
return READ_ONCE(ailp->ail_target);
}
void xfs_ail_push_all_sync(struct xfs_ail *ailp);
xfs_lsn_t xfs_ail_min_lsn(struct xfs_ail *ailp);
struct xfs_log_item * xfs_trans_ail_cursor_first(struct xfs_ail *ailp,
struct xfs_ail_cursor *cur,
xfs_lsn_t lsn);
struct xfs_log_item * xfs_trans_ail_cursor_last(struct xfs_ail *ailp,
struct xfs_ail_cursor *cur,
xfs_lsn_t lsn);
struct xfs_log_item * xfs_trans_ail_cursor_next(struct xfs_ail *ailp,
Annotation
- Detected declarations: `struct xlog`, `struct xfs_log_item`, `struct xfs_mount`, `struct xfs_trans`, `struct xfs_ail`, `struct xfs_log_vec`, `struct xfs_ail_cursor`, `struct xfs_ail`, `function xfs_ail_min`, `function xfs_trans_ail_update`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.