Home | History | Annotate | Download | only in lfs

Lines Matching defs:dq

716 	struct dquot *dq;
729 while ((dq = LIST_FIRST(&oldhash[i])) != NULL) {
730 dqvp = dq->dq_ump->um_quotas[dq->dq_type];
731 LIST_REMOVE(dq, dq_hash);
732 hashval = DQHASH(dqvp, dq->dq_id);
733 LIST_INSERT_HEAD(&dqhashtbl[hashval], dq, dq_hash);
810 struct dquot *dq, *ndq;
846 LIST_FOREACH(dq, dqh, dq_hash) {
847 if (dq->dq_id != id ||
848 dq->dq_ump->um_quotas[dq->dq_type] != dqvp)
850 KASSERT(dq->dq_cnt > 0);
851 lfs_dqref(dq);
853 *dqp = dq;
872 LIST_FOREACH(dq, dqh, dq_hash) {
873 if (dq->dq_id != id ||
874 dq->dq_ump->um_quotas[dq->dq_type] != dqvp)
879 KASSERT(dq->dq_cnt > 0);
880 lfs_dqref(dq);
884 *dqp = dq;
887 dq = ndq;
888 LIST_INSERT_HEAD(dqh, dq, dq_hash);
889 lfs_dqref(dq);
890 mutex_enter(&dq->dq_interlock);
894 error = lfs_dq1get(dqvp, id, ump, type, dq);
898 error = lfs_dq2get(dqvp, id, ump, type, dq);
906 LIST_REMOVE(dq, dq_hash);
908 mutex_exit(&dq->dq_interlock);
909 lfs_dqrele(vp, dq);
913 mutex_exit(&dq->dq_interlock);
914 *dqp = dq;
922 lfs_dqref(struct dquot *dq)
926 dq->dq_cnt++;
927 KASSERT(dq->dq_cnt > 0);
934 lfs_dqrele(struct vnode *vp, struct dquot *dq)
937 if (dq == NODQUOT)
939 mutex_enter(&dq->dq_interlock);
942 if (dq->dq_cnt > 1) {
943 dq->dq_cnt--;
945 mutex_exit(&dq->dq_interlock);
948 if ((dq->dq_flags & DQ_MOD) == 0)
952 if (dq->dq_ump->um_lfs->um_flags & ULFS_QUOTA)
953 (void) lfs_dq1sync(vp, dq);
956 if (dq->dq_ump->um_lfs->um_flags & ULFS_QUOTA2)
957 (void) lfs_dq2sync(vp, dq);
960 KASSERT(dq->dq_cnt == 1 && (dq->dq_flags & DQ_MOD) == 0);
961 LIST_REMOVE(dq, dq_hash);
963 mutex_exit(&dq->dq_interlock);
964 mutex_destroy(&dq->dq_interlock);
965 pool_cache_put(dquot_cache, dq);
996 struct dquot *dq;
1001 LIST_FOREACH(dq, &dqhashtbl[i], dq_hash)
1002 KASSERT(dq->dq_ump->um_quotas[dq->dq_type] != vp);