aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_qm.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_qm.h')
-rw-r--r--fs/xfs/xfs_qm.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/fs/xfs/xfs_qm.h b/fs/xfs/xfs_qm.h
index bdb4f8b95207..579d6a02a5b6 100644
--- a/fs/xfs/xfs_qm.h
+++ b/fs/xfs/xfs_qm.h
@@ -44,9 +44,11 @@ extern struct kmem_zone *xfs_qm_dqtrxzone;
44typedef struct xfs_quotainfo { 44typedef struct xfs_quotainfo {
45 struct radix_tree_root qi_uquota_tree; 45 struct radix_tree_root qi_uquota_tree;
46 struct radix_tree_root qi_gquota_tree; 46 struct radix_tree_root qi_gquota_tree;
47 struct radix_tree_root qi_pquota_tree;
47 struct mutex qi_tree_lock; 48 struct mutex qi_tree_lock;
48 xfs_inode_t *qi_uquotaip; /* user quota inode */ 49 struct xfs_inode *qi_uquotaip; /* user quota inode */
49 xfs_inode_t *qi_gquotaip; /* group quota inode */ 50 struct xfs_inode *qi_gquotaip; /* group quota inode */
51 struct xfs_inode *qi_pquotaip; /* project quota inode */
50 struct list_head qi_lru_list; 52 struct list_head qi_lru_list;
51 struct mutex qi_lru_lock; 53 struct mutex qi_lru_lock;
52 int qi_lru_count; 54 int qi_lru_count;
@@ -78,8 +80,9 @@ xfs_dquot_tree(
78 case XFS_DQ_USER: 80 case XFS_DQ_USER:
79 return &qi->qi_uquota_tree; 81 return &qi->qi_uquota_tree;
80 case XFS_DQ_GROUP: 82 case XFS_DQ_GROUP:
81 case XFS_DQ_PROJ:
82 return &qi->qi_gquota_tree; 83 return &qi->qi_gquota_tree;
84 case XFS_DQ_PROJ:
85 return &qi->qi_pquota_tree;
83 default: 86 default:
84 ASSERT(0); 87 ASSERT(0);
85 } 88 }
@@ -93,8 +96,9 @@ xfs_dq_to_quota_inode(struct xfs_dquot *dqp)
93 case XFS_DQ_USER: 96 case XFS_DQ_USER:
94 return dqp->q_mount->m_quotainfo->qi_uquotaip; 97 return dqp->q_mount->m_quotainfo->qi_uquotaip;
95 case XFS_DQ_GROUP: 98 case XFS_DQ_GROUP:
96 case XFS_DQ_PROJ:
97 return dqp->q_mount->m_quotainfo->qi_gquotaip; 99 return dqp->q_mount->m_quotainfo->qi_gquotaip;
100 case XFS_DQ_PROJ:
101 return dqp->q_mount->m_quotainfo->qi_pquotaip;
98 default: 102 default:
99 ASSERT(0); 103 ASSERT(0);
100 } 104 }
@@ -107,18 +111,20 @@ extern void xfs_trans_mod_dquot(struct xfs_trans *,
107 struct xfs_dquot *, uint, long); 111 struct xfs_dquot *, uint, long);
108extern int xfs_trans_reserve_quota_bydquots(struct xfs_trans *, 112extern int xfs_trans_reserve_quota_bydquots(struct xfs_trans *,
109 struct xfs_mount *, struct xfs_dquot *, 113 struct xfs_mount *, struct xfs_dquot *,
110 struct xfs_dquot *, long, long, uint); 114 struct xfs_dquot *, struct xfs_dquot *,
115 long, long, uint);
111extern void xfs_trans_dqjoin(struct xfs_trans *, struct xfs_dquot *); 116extern void xfs_trans_dqjoin(struct xfs_trans *, struct xfs_dquot *);
112extern void xfs_trans_log_dquot(struct xfs_trans *, struct xfs_dquot *); 117extern void xfs_trans_log_dquot(struct xfs_trans *, struct xfs_dquot *);
113 118
114/* 119/*
115 * We keep the usr and grp dquots separately so that locking will be easier 120 * We keep the usr, grp, and prj dquots separately so that locking will be
116 * to do at commit time. All transactions that we know of at this point 121 * easier to do at commit time. All transactions that we know of at this point
117 * affect no more than two dquots of one type. Hence, the TRANS_MAXDQS value. 122 * affect no more than two dquots of one type. Hence, the TRANS_MAXDQS value.
118 */ 123 */
119enum { 124enum {
120 XFS_QM_TRANS_USR = 0, 125 XFS_QM_TRANS_USR = 0,
121 XFS_QM_TRANS_GRP, 126 XFS_QM_TRANS_GRP,
127 XFS_QM_TRANS_PRJ,
122 XFS_QM_TRANS_DQTYPES 128 XFS_QM_TRANS_DQTYPES
123}; 129};
124#define XFS_QM_TRANS_MAXDQS 2 130#define XFS_QM_TRANS_MAXDQS 2