#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_bit.h"
#include "xfs_sb.h"
#include "xfs_mount.h"
#include "xfs_inode.h"
#include "xfs_iwalk.h"
#include "xfs_quota.h"
#include "xfs_bmap.h"
#include "xfs_bmap_util.h"
#include "xfs_trans.h"
#include "xfs_trans_space.h"
#include "xfs_qm.h"
#include "xfs_trace.h"
#include "xfs_icache.h"
#include "xfs_error.h"
#include "xfs_ag.h"
#include "xfs_ialloc.h"
#include "xfs_log_priv.h"
#include "xfs_health.h"
STATIC int xfs_qm_init_quotainos(struct xfs_mount *mp);
STATIC int xfs_qm_init_quotainfo(struct xfs_mount *mp);
STATIC void xfs_qm_destroy_quotainos(struct xfs_quotainfo *qi);
STATIC void xfs_qm_dqfree_one(struct xfs_dquot *dqp);
#define XFS_DQ_LOOKUP_BATCH …
STATIC int
xfs_qm_dquot_walk(
struct xfs_mount *mp,
xfs_dqtype_t type,
int (*execute)(struct xfs_dquot *dqp, void *data),
void *data)
{ … }
STATIC int
xfs_qm_dqpurge(
struct xfs_dquot *dqp,
void *data)
{ … }
static void
xfs_qm_dqpurge_all(
struct xfs_mount *mp)
{ … }
void
xfs_qm_unmount(
struct xfs_mount *mp)
{ … }
void
xfs_qm_unmount_quotas(
xfs_mount_t *mp)
{ … }
STATIC int
xfs_qm_dqattach_one(
struct xfs_inode *ip,
xfs_dqtype_t type,
bool doalloc,
struct xfs_dquot **IO_idqpp)
{ … }
static bool
xfs_qm_need_dqattach(
struct xfs_inode *ip)
{ … }
int
xfs_qm_dqattach_locked(
xfs_inode_t *ip,
bool doalloc)
{ … }
int
xfs_qm_dqattach(
struct xfs_inode *ip)
{ … }
void
xfs_qm_dqdetach(
xfs_inode_t *ip)
{ … }
struct xfs_qm_isolate { … };
static enum lru_status
xfs_qm_dquot_isolate(
struct list_head *item,
struct list_lru_one *lru,
spinlock_t *lru_lock,
void *arg)
__releases(lru_lock) __acquires(lru_lock)
{ … }
static unsigned long
xfs_qm_shrink_scan(
struct shrinker *shrink,
struct shrink_control *sc)
{ … }
static unsigned long
xfs_qm_shrink_count(
struct shrinker *shrink,
struct shrink_control *sc)
{ … }
STATIC void
xfs_qm_set_defquota(
struct xfs_mount *mp,
xfs_dqtype_t type,
struct xfs_quotainfo *qinf)
{ … }
static void
xfs_qm_init_timelimits(
struct xfs_mount *mp,
xfs_dqtype_t type)
{ … }
STATIC int
xfs_qm_init_quotainfo(
struct xfs_mount *mp)
{ … }
void
xfs_qm_destroy_quotainfo(
struct xfs_mount *mp)
{ … }
STATIC int
xfs_qm_qino_alloc(
struct xfs_mount *mp,
struct xfs_inode **ipp,
unsigned int flags)
{ … }
STATIC void
xfs_qm_reset_dqcounts(
struct xfs_mount *mp,
struct xfs_buf *bp,
xfs_dqid_t id,
xfs_dqtype_t type)
{ … }
STATIC int
xfs_qm_reset_dqcounts_all(
struct xfs_mount *mp,
xfs_dqid_t firstid,
xfs_fsblock_t bno,
xfs_filblks_t blkcnt,
xfs_dqtype_t type,
struct list_head *buffer_list)
{ … }
STATIC int
xfs_qm_reset_dqcounts_buf(
struct xfs_mount *mp,
struct xfs_inode *qip,
xfs_dqtype_t type,
struct list_head *buffer_list)
{ … }
STATIC int
xfs_qm_quotacheck_dqadjust(
struct xfs_inode *ip,
xfs_dqtype_t type,
xfs_qcnt_t nblks,
xfs_qcnt_t rtblks)
{ … }
STATIC int
xfs_qm_dqusage_adjust(
struct xfs_mount *mp,
struct xfs_trans *tp,
xfs_ino_t ino,
void *data)
{ … }
STATIC int
xfs_qm_flush_one(
struct xfs_dquot *dqp,
void *data)
{ … }
STATIC int
xfs_qm_quotacheck(
xfs_mount_t *mp)
{ … }
void
xfs_qm_mount_quotas(
struct xfs_mount *mp)
{ … }
STATIC int
xfs_qm_init_quotainos(
xfs_mount_t *mp)
{ … }
STATIC void
xfs_qm_destroy_quotainos(
struct xfs_quotainfo *qi)
{ … }
STATIC void
xfs_qm_dqfree_one(
struct xfs_dquot *dqp)
{ … }
int
xfs_qm_vop_dqalloc(
struct xfs_inode *ip,
kuid_t uid,
kgid_t gid,
prid_t prid,
uint flags,
struct xfs_dquot **O_udqpp,
struct xfs_dquot **O_gdqpp,
struct xfs_dquot **O_pdqpp)
{ … }
struct xfs_dquot *
xfs_qm_vop_chown(
struct xfs_trans *tp,
struct xfs_inode *ip,
struct xfs_dquot **IO_olddq,
struct xfs_dquot *newdq)
{ … }
int
xfs_qm_vop_rename_dqattach(
struct xfs_inode **i_tab)
{ … }
void
xfs_qm_vop_create_dqattach(
struct xfs_trans *tp,
struct xfs_inode *ip,
struct xfs_dquot *udqp,
struct xfs_dquot *gdqp,
struct xfs_dquot *pdqp)
{ … }
bool
xfs_inode_near_dquot_enforcement(
struct xfs_inode *ip,
xfs_dqtype_t type)
{ … }