Lines Matching refs:xqm

121 	xfs_qm_t		*xqm;  in xfs_Gqm_init()  local
124 xqm = kmem_zalloc(sizeof(xfs_qm_t), KM_SLEEP); in xfs_Gqm_init()
125 ASSERT(xqm); in xfs_Gqm_init()
132 xqm->qm_dqhashmask = hsize - 1; in xfs_Gqm_init()
134 xqm->qm_usr_dqhtable = (xfs_dqhash_t *)kmem_zalloc(hsize * in xfs_Gqm_init()
137 xqm->qm_grp_dqhtable = (xfs_dqhash_t *)kmem_zalloc(hsize * in xfs_Gqm_init()
140 ASSERT(xqm->qm_usr_dqhtable != NULL); in xfs_Gqm_init()
141 ASSERT(xqm->qm_grp_dqhtable != NULL); in xfs_Gqm_init()
144 xfs_qm_list_init(&(xqm->qm_usr_dqhtable[i]), "uxdqh", i); in xfs_Gqm_init()
145 xfs_qm_list_init(&(xqm->qm_grp_dqhtable[i]), "gxdqh", i); in xfs_Gqm_init()
151 xfs_qm_freelist_init(&(xqm->qm_dqfreelist)); in xfs_Gqm_init()
157 xqm->qm_dqzone = kmem_zone_init(sizeof(xfs_dquot_t), in xfs_Gqm_init()
159 qm_dqzone = xqm->qm_dqzone; in xfs_Gqm_init()
161 xqm->qm_dqzone = qm_dqzone; in xfs_Gqm_init()
169 xqm->qm_dqtrxzone = kmem_zone_init(sizeof(xfs_dquot_acct_t), in xfs_Gqm_init()
171 qm_dqtrxzone = xqm->qm_dqtrxzone; in xfs_Gqm_init()
173 xqm->qm_dqtrxzone = qm_dqtrxzone; in xfs_Gqm_init()
175 atomic_set(&xqm->qm_totaldquots, 0); in xfs_Gqm_init()
176 xqm->qm_dqfree_ratio = XFS_QM_DQFREE_RATIO; in xfs_Gqm_init()
177 xqm->qm_nrefs = 0; in xfs_Gqm_init()
181 return xqm; in xfs_Gqm_init()
189 struct xfs_qm *xqm) in xfs_qm_destroy() argument
193 ASSERT(xqm != NULL); in xfs_qm_destroy()
194 ASSERT(xqm->qm_nrefs == 0); in xfs_qm_destroy()
196 hsize = xqm->qm_dqhashmask + 1; in xfs_qm_destroy()
198 xfs_qm_list_destroy(&(xqm->qm_usr_dqhtable[i])); in xfs_qm_destroy()
199 xfs_qm_list_destroy(&(xqm->qm_grp_dqhtable[i])); in xfs_qm_destroy()
201 kmem_free(xqm->qm_usr_dqhtable, hsize * sizeof(xfs_dqhash_t)); in xfs_qm_destroy()
202 kmem_free(xqm->qm_grp_dqhtable, hsize * sizeof(xfs_dqhash_t)); in xfs_qm_destroy()
203 xqm->qm_usr_dqhtable = NULL; in xfs_qm_destroy()
204 xqm->qm_grp_dqhtable = NULL; in xfs_qm_destroy()
205 xqm->qm_dqhashmask = 0; in xfs_qm_destroy()
206 xfs_qm_freelist_destroy(&(xqm->qm_dqfreelist)); in xfs_qm_destroy()
210 kmem_free(xqm, sizeof(xfs_qm_t)); in xfs_qm_destroy()
2831 xfs_qm_t *xqm) in xfs_qm_freelist_lock_nowait() argument
2835 locked = mutex_trylock(&(xqm->qm_dqfreelist.qh_lock)); in xfs_qm_freelist_lock_nowait()