/* SPDX-License-Identifier: GPL-2.0 */ /* * quota.h for OCFS2 * * On disk quota structures for local and global quota file, in-memory * structures. *
*/
/* Number of quota types we support */ #define OCFS2_MAXQUOTAS 2
/* * In-memory structures
*/ struct ocfs2_dquot { struct dquot dq_dquot; /* Generic VFS dquot */
loff_t dq_local_off; /* Offset in the local quota file */
u64 dq_local_phys_blk; /* Physical block carrying quota structure */ struct ocfs2_quota_chunk *dq_chunk; /* Chunk dquot is in */ unsignedint dq_use_count; /* Number of nodes having reference to this entry in global quota file */
s64 dq_origspace; /* Last globally synced space usage */
s64 dq_originodes; /* Last globally synced inode usage */ struct llist_node list; /* Member of list of dquots to drop */
};
/* Description of one chunk to recover in memory */ struct ocfs2_recovery_chunk { struct list_head rc_list; /* List of chunks */ int rc_chunk; /* Chunk number */ unsignedlong *rc_bitmap; /* Bitmap of entries to recover */
};
struct ocfs2_quota_recovery { struct list_head r_list[OCFS2_MAXQUOTAS]; /* List of chunks to recover */
};
/* In-memory structure with quota header information */ struct ocfs2_mem_dqinfo { unsignedint dqi_type; /* Quota type this structure describes */ unsignedint dqi_flags; /* Flags OLQF_* */ unsignedint dqi_chunks; /* Number of chunks in local quota file */ unsignedint dqi_blocks; /* Number of blocks allocated for local quota file */ unsignedint dqi_syncms; /* How often should we sync with other nodes */ struct list_head dqi_chunk; /* List of chunks */ struct inode *dqi_gqinode; /* Global quota file inode */ struct ocfs2_lock_res dqi_gqlock; /* Lock protecting quota information structure */ struct buffer_head *dqi_gqi_bh; /* Buffer head with global quota file inode - set only if inode lock is obtained */ int dqi_gqi_count; /* Number of holders of dqi_gqi_bh */
u64 dqi_giblk; /* Number of block with global information header */ struct buffer_head *dqi_lqi_bh; /* Buffer head with local quota file inode */ struct buffer_head *dqi_libh; /* Buffer with local information header */ struct qtree_mem_dqinfo dqi_gi; /* Info about global file */ struct delayed_work dqi_sync_work; /* Work for syncing dquots */ struct ocfs2_quota_recovery *dqi_rec; /* Pointer to recovery * information, in case we * enable quotas on file
* needing it */
};
struct ocfs2_quota_chunk { struct list_head qc_chunk; /* List of quotafile chunks */ int qc_num; /* Number of quota chunk */ struct buffer_head *qc_headerbh; /* Buffer head with chunk header */
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.