Lines Matching refs:ump

278 	struct ufsmount *ump = VFSTOUFS(mp);
281 if ((ump->um_flags & UFS_QUOTA) == 0)
288 if (ump->um_quotas[i] != NULLVP) {
289 quota1_handle_cmd_quotaoff(l, ump, i);
303 quota1_handle_cmd_quotaon(struct lwp *l, struct ufsmount *ump, int type,
306 struct mount *mp = ump->um_mountp;
313 if (ump->um_flags & UFS_QUOTA2) {
325 vpp = &ump->um_quotas[type];
345 quota1_handle_cmd_quotaoff(l, ump, type);
347 while ((ump->umq1_qflags[type] & (QTF_CLOSING | QTF_OPENING)) != 0)
349 ump->umq1_qflags[type] |= QTF_OPENING;
359 ump->um_cred[type] = l->l_cred;
360 ump->umq1_btime[type] = MAX_DQ_TIME;
361 ump->umq1_itime[type] = MAX_IQ_TIME;
362 if (dqget(NULLVP, 0, ump, type, &dq) == 0) {
364 ump->umq1_btime[type] = dq->dq_btime;
366 ump->umq1_itime[type] = dq->dq_itime;
406 ump->umq1_qflags[type] &= ~QTF_OPENING;
409 ump->um_flags |= UFS_QUOTA;
412 quota1_handle_cmd_quotaoff(l, ump, type);
420 quota1_handle_cmd_quotaoff(struct lwp *l, struct ufsmount *ump, int type)
422 struct mount *mp = ump->um_mountp;
434 while ((ump->umq1_qflags[type] & (QTF_CLOSING | QTF_OPENING)) != 0)
436 if ((qvp = ump->um_quotas[type]) == NULLVP) {
441 ump->umq1_qflags[type] |= QTF_CLOSING;
442 ump->um_flags &= ~UFS_QUOTA;
479 ump->um_quotas[type] = NULLVP;
480 cred = ump->um_cred[type];
481 ump->um_cred[type] = NOCRED;
483 if (ump->um_quotas[i] != NULLVP)
485 ump->umq1_qflags[type] &= ~QTF_CLOSING;
495 quota1_handle_cmd_get(struct ufsmount *ump, const struct quotakey *qk,
507 if (ump->um_quotas[idtype] == NULLVP)
511 if ((error = dqget(NULLVP, 0, ump, idtype, &dq)) != 0)
515 if ((error = dqget(NULLVP, id, ump, idtype, &dq)) != 0)
555 quota1_handle_cmd_put(struct ufsmount *ump, const struct quotakey *key,
578 if (ump->um_quotas[key->qk_idtype] == NULLVP)
585 if ((error = dqget(NULLVP, id, ump, key->qk_idtype, &dq)) != 0)
590 ump->umq1_btime[key->qk_idtype] = dq->dq_btime =
593 ump->umq1_itime[key->qk_idtype] = dq->dq_itime =
602 if ((error = dqget(NULLVP, key->qk_id, ump, key->qk_idtype, &dq)) != 0)
629 ump->umq1_btime[key->qk_idtype] = dqb.dqb_btime =
633 ump->umq1_itime[key->qk_idtype] = dqb.dqb_itime =
640 dqb.dqb_btime = time_second + ump->umq1_btime[key->qk_idtype];
644 dqb.dqb_itime = time_second + ump->umq1_itime[key->qk_idtype];
671 struct ufsmount *ump = VFSTOUFS(mp);
674 if ((error = dqget(NULLVP, id, ump, type, &ndq)) != 0)
692 dqb->dqb_btime = time_second + ump->umq1_btime[type];
696 dqb->dqb_itime = time_second + ump->umq1_itime[type];
720 struct ufsmount *ump = VFSTOUFS(mp);
728 if ((error = dqget(NULLVP, id, ump, type, &ndq)) != 0)
738 dq->dq_btime = time_second + ump->umq1_btime[type];
741 dq->dq_itime = time_second + ump->umq1_itime[type];
761 struct ufsmount *ump = VFSTOUFS(mp);
771 if (ump->um_quotas[i] != NULLVP)
826 dq1get(struct vnode *dqvp, u_long id, struct ufsmount *ump, int type,
843 error = VOP_READ(dqvp, &auio, 0, ump->um_cred[type]);
862 dq->dq_btime = time_second + ump->umq1_btime[type];
864 dq->dq_itime = time_second + ump->umq1_itime[type];