/* SPDX-License-Identifier: GPL-2.0 */ /* * Definitions for diskquota-operations. When diskquota is configured these * macros expand to the right source-code. * * Author: Marco van Wieringen <mvw@planets.elm.net>
*/ #ifndef _LINUX_QUOTAOPS_ #define _LINUX_QUOTAOPS_
int dquot_disable(struct super_block *sb, int type, unsignedint flags); /* Suspend quotas on remount RO */ staticinlineint dquot_suspend(struct super_block *sb, int type)
{ return dquot_disable(sb, type, DQUOT_SUSPENDED);
} int dquot_resume(struct super_block *sb, int type);
int dquot_commit(struct dquot *dquot); int dquot_acquire(struct dquot *dquot); int dquot_release(struct dquot *dquot); int dquot_commit_info(struct super_block *sb, int type); int dquot_get_next_id(struct super_block *sb, struct kqid *qid); int dquot_mark_dquot_dirty(struct dquot *dquot);
int dquot_file_open(struct inode *inode, struct file *file);
int dquot_load_quota_sb(struct super_block *sb, int type, int format_id, unsignedint flags); int dquot_load_quota_inode(struct inode *inode, int type, int format_id, unsignedint flags); int dquot_quota_on(struct super_block *sb, int type, int format_id, conststruct path *path); int dquot_quota_on_mount(struct super_block *sb, char *qf_name, int format_id, int type); int dquot_quota_off(struct super_block *sb, int type); int dquot_writeback_dquots(struct super_block *sb, int type); int dquot_quota_sync(struct super_block *sb, int type); int dquot_get_state(struct super_block *sb, struct qc_state *state); int dquot_set_dqinfo(struct super_block *sb, int type, struct qc_info *ii); int dquot_get_dqblk(struct super_block *sb, struct kqid id, struct qc_dqblk *di); int dquot_get_next_dqblk(struct super_block *sb, struct kqid *id, struct qc_dqblk *di); int dquot_set_dqblk(struct super_block *sb, struct kqid id, struct qc_dqblk *di);
int __dquot_transfer(struct inode *inode, struct dquot **transfer_to); int dquot_transfer(struct mnt_idmap *idmap, struct inode *inode, struct iattr *iattr);
/* Does kernel know about any quota information for given sb + type? */ staticinlinebool sb_has_quota_loaded(struct super_block *sb, int type)
{ /* Currently if anything is on, then quota usage is on as well */ return sb_has_quota_usage_enabled(sb, type);
}
/* Does kernel know about any quota information for given sb + type? */ staticinlineint sb_has_quota_loaded(struct super_block *sb, int type)
{ return 0;
}
staticinlineint dquot_alloc_space(struct inode *inode, qsize_t nr)
{ int ret;
ret = dquot_alloc_space_nodirty(inode, nr); if (!ret) { /* * Mark inode fully dirty. Since we are allocating blocks, inode * would become fully dirty soon anyway and it reportedly * reduces lock contention.
*/
mark_inode_dirty(inode);
} return ret;
}
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.