fs/xfs/xfs_qm.h
Source file repositories/reference/linux-study-clean/fs/xfs/xfs_qm.h
File Facts
- System
- Linux kernel
- Corpus path
fs/xfs/xfs_qm.h- Extension
.h- Size
- 5252 bytes
- Lines
- 192
- 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_dquot_item.hxfs_dquot.h
Detected Declarations
struct xfs_inodestruct xfs_quota_limitsstruct xfs_def_quotastruct xfs_quotainfostruct xfs_mod_ino_dqtrx_paramsstruct xfs_dquot_acctfunction xfs_dquot_treefunction xfs_quota_inodefunction xfs_get_defquota
Annotated Snippet
struct xfs_quota_limits {
xfs_qcnt_t hard; /* default hard limit */
xfs_qcnt_t soft; /* default soft limit */
time64_t time; /* limit for timers */
};
/* Defaults for each quota type: time limits, warn limits, usage limits */
struct xfs_def_quota {
struct xfs_quota_limits blk;
struct xfs_quota_limits ino;
struct xfs_quota_limits rtb;
};
/*
* Various quota information for individual filesystems.
* The mount structure keeps a pointer to this.
*/
struct xfs_quotainfo {
struct radix_tree_root qi_uquota_tree;
struct radix_tree_root qi_gquota_tree;
struct radix_tree_root qi_pquota_tree;
struct mutex qi_tree_lock;
struct xfs_inode *qi_uquotaip; /* user quota inode */
struct xfs_inode *qi_gquotaip; /* group quota inode */
struct xfs_inode *qi_pquotaip; /* project quota inode */
struct xfs_inode *qi_dirip; /* quota metadir */
struct list_lru qi_lru;
uint64_t qi_dquots;
struct mutex qi_quotaofflock;/* to serialize quotaoff */
xfs_filblks_t qi_dqchunklen; /* # BBs in a chunk of dqs */
uint qi_dqperchunk; /* # ondisk dq in above chunk */
struct xfs_def_quota qi_usr_default;
struct xfs_def_quota qi_grp_default;
struct xfs_def_quota qi_prj_default;
struct shrinker *qi_shrinker;
/* Minimum and maximum quota expiration timestamp values. */
time64_t qi_expiry_min;
time64_t qi_expiry_max;
/* Hook to feed quota counter updates to an active online repair. */
struct xfs_hooks qi_mod_ino_dqtrx_hooks;
struct xfs_hooks qi_apply_dqtrx_hooks;
};
static inline struct radix_tree_root *
xfs_dquot_tree(
struct xfs_quotainfo *qi,
xfs_dqtype_t type)
{
switch (type) {
case XFS_DQTYPE_USER:
return &qi->qi_uquota_tree;
case XFS_DQTYPE_GROUP:
return &qi->qi_gquota_tree;
case XFS_DQTYPE_PROJ:
return &qi->qi_pquota_tree;
default:
ASSERT(0);
}
return NULL;
}
static inline struct xfs_inode *
xfs_quota_inode(struct xfs_mount *mp, xfs_dqtype_t type)
{
switch (type) {
case XFS_DQTYPE_USER:
return mp->m_quotainfo->qi_uquotaip;
case XFS_DQTYPE_GROUP:
return mp->m_quotainfo->qi_gquotaip;
case XFS_DQTYPE_PROJ:
return mp->m_quotainfo->qi_pquotaip;
default:
ASSERT(0);
}
return NULL;
}
/*
* Parameters for tracking dqtrx changes on behalf of an inode. The hook
* function arg parameter is the field being updated.
*/
struct xfs_mod_ino_dqtrx_params {
uintptr_t tx_id;
xfs_ino_t ino;
xfs_dqtype_t q_type;
xfs_dqid_t q_id;
int64_t delta;
};
Annotation
- Immediate include surface: `xfs_dquot_item.h`, `xfs_dquot.h`.
- Detected declarations: `struct xfs_inode`, `struct xfs_quota_limits`, `struct xfs_def_quota`, `struct xfs_quotainfo`, `struct xfs_mod_ino_dqtrx_params`, `struct xfs_dquot_acct`, `function xfs_dquot_tree`, `function xfs_quota_inode`, `function xfs_get_defquota`.
- 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.