Lines Matching refs:ump
142 getq2h(struct ulfsmount *ump, int type,
145 struct lfs *fs = ump->um_lfs;
152 error = bread(ump->um_quotas[type], 0, ump->umq2_bsize, flags, &bp);
168 getq2e(struct ulfsmount *ump, int type, daddr_t lblkno, int blkoffset,
178 error = bread(ump->um_quotas[type], lblkno, ump->umq2_bsize, flags, &bp);
194 quota2_walk_list(struct ulfsmount *ump, struct buf *hbp, int type,
198 struct lfs *fs = ump->um_lfs;
209 lblkno = (off >> ump->um_mountp->mnt_fs_bshift);
210 blkoff = (off & ump->umq2_bmask);
218 ret = bread(ump->um_quotas[type], lblkno,
219 ump->umq2_bsize, flags, &bp);
228 ret = (*func)(ump, offp, q2e, off, a);
271 struct ulfsmount *ump = VFSTOULFS(mp);
272 struct lfs *fs = ump->um_lfs;
278 if (ump->um_quotas[i] != NULLVP) {
279 error = vn_close(ump->um_quotas[i], FREAD|FWRITE,
280 ump->um_cred[i]);
283 ump->um_quotas[i], error);
287 ump->um_quotas[i] = NULLVP;
293 quota2_q2ealloc(struct ulfsmount *ump, int type, uid_t uid, struct dquot *dq)
301 struct lfs *fs = ump->um_lfs;
306 error = getq2h(ump, type, &hbp, &q2h, B_MODIFY);
311 struct vnode *vp = ump->um_quotas[type];
315 error = lfs_balloc(vp, size, ump->umq2_bsize,
316 ump->um_cred[type], B_CLRBUF | B_SYNC, &bp);
321 KASSERT((ip->i_size % ump->umq2_bsize) == 0);
322 ip->i_size += ump->umq2_bsize;
326 lfsquota2_addfreeq2e(q2h, bp->b_data, size, ump->umq2_bsize,
339 dq->dq2_lblkno = (offset >> ump->um_mountp->mnt_fs_bshift);
340 dq->dq2_blkoff = (offset & ump->umq2_bmask);
345 error = getq2e(ump, type, dq->dq2_lblkno,
375 struct ulfsmount *ump = ip->i_ump;
398 if (__predict_false(ump->um_quotas[i] == NULL)) {
415 error = quota2_q2ealloc(ump, i, ino_ids[i], dq);
421 error = getq2e(ump, i, dq->dq2_lblkno,
447 struct ulfsmount *ump = ip->i_ump;
449 struct mount *mp = ump->um_mountp;
578 lfsquota2_handle_cmd_put(struct ulfsmount *ump, const struct quotakey *key,
586 struct lfs *fs = ump->um_lfs;
593 if (ump
598 error = getq2h(ump, key->qk_idtype, &bp, &q2h, B_MODIFY);
607 quota2_bwrite(ump->um_mountp, bp);
611 error = lfs_dqget(NULLVP, key->qk_id, ump, key->qk_idtype, &dq);
619 error = quota2_q2ealloc(ump, key->qk_idtype, key->qk_id, dq);
625 error = getq2e(ump, key->qk_idtype, dq->dq2_lblkno,
642 quota2_bwrite(ump->um_mountp, bp);
658 dq2clear_callback(struct ulfsmount *ump, uint64_t *offp, struct quota2_entry *q2e,
662 struct lfs *fs = ump->um_lfs;
681 lfsquota2_handle_cmd_del(struct ulfsmount *ump, const struct quotakey *qk)
698 if (ump->um_quotas[idtype] == NULLVP)
705 error = getq2h(ump, idtype, &hbp, &q2h, 0);
715 error = lfs_dqget(NULLVP, id, ump, idtype, &dq);
726 error = getq2e(ump, idtype, dq->dq2_lblkno, dq->dq2_blkoff,
761 quota2_bwrite(ump->um_mountp, bp);
767 error = getq2h(ump, idtype, &hbp, &q2h, 0);
775 error = quota2_walk_list(ump, hbp, idtype,
791 quota2_fetch_q2e(struct ulfsmount *ump, const struct quotakey *qk,
798 struct lfs *fs = ump->um_lfs;
801 error = lfs_dqget(NULLVP, qk->qk_id, ump, qk->qk_idtype, &dq);
811 error = getq2e(ump, qk->qk_idtype, dq->dq2_lblkno, dq->dq2_blkoff,
827 quota2_fetch_quotaval(struct ulfsmount *ump, const struct quotakey *qk,
834 struct lfs *fs = ump->um_lfs;
838 error = lfs_dqget(NULLVP, qk->qk_id, ump, qk->qk_idtype, &dq);
848 error = getq2e(ump, qk->qk_idtype, dq->dq2_lblkno, dq->dq2_blkoff,
866 lfsquota2_handle_cmd_get(struct ulfsmount *ump, const struct quotakey *qk,
873 struct lfs *fs = ump->um_lfs;
890 if (ump->um_quotas[qk->qk_idtype] == NULLVP)
894 error = getq2h(ump, qk->qk_idtype, &bp, &q2h, 0);
906 error = quota2_fetch_quotaval(ump, qk, qv);
1095 q2cursor_getids_callback(struct ulfsmount *ump, uint64_t *offp,
1100 struct lfs *fs = ump->um_lfs;
1122 q2cursor_getkeys(struct ulfsmount *ump, int idtype, struct ulfsq2_cursor *cursor,
1126 struct lfs *fs = ump->um_lfs;
1140 error = getq2h(ump, idtype, &hbp, &q2h, 0);
1183 error = quota2_walk_list(ump, hbp, idtype, &offset, 0, &gi,
1221 q2cursor_getvals(struct ulfsmount *ump, struct q2cursor_state *state,
1241 error = quota2_fetch_q2e(ump,
1273 lfsquota2_handle_cmd_cursorget(struct ulfsmount *ump, struct quotakcursor *qkc,
1310 ump->um_quotas[ULFS_USRQUOTA] == NULLVP) {
1314 ump->um_quotas[ULFS_GRPQUOTA] == NULLVP) {
1328 KASSERT(ump->um_quotas[idtype] != NULLVP);
1340 error = q2cursor_getkeys(ump, idtype, &newcursor, &state,
1347 error = q2cursor_getvals(ump, &state, &default_q2e);
1389 lfsquota2_handle_cmd_cursoropen(struct ulfsmount *ump, struct quotakcursor *qkc)
1409 lfsquota2_handle_cmd_cursorclose(struct ulfsmount *ump, struct quotakcursor *qkc)
1426 lfsquota2_handle_cmd_cursorskipidtype(struct ulfsmount *ump,
1453 lfsquota2_handle_cmd_cursoratend(struct ulfsmount *ump, struct quotakcursor *qkc,
1470 lfsquota2_handle_cmd_cursorrewind(struct ulfsmount *ump, struct quotakcursor *qkc)
1505 dq2get_callback(struct ulfsmount *ump, uint64_t *offp, struct quota2_entry *q2e,
1511 struct lfs *fs = ump->um_lfs;
1516 lblkno = (off >> ump->um_mountp->mnt_fs_bshift);
1517 blkoff = (off & ump->umq2_bmask);
1526 lfs_dq2get(struct vnode *dqvp, u_long id, struct ulfsmount *ump, int type,
1541 error = getq2h(ump, type, &bp, &q2h, 0);
1547 error = quota2_walk_list(ump, bp, type, &offset, 0, (void *)&c,
1564 struct ulfsmount *ump = VFSTOULFS(mp);
1565 struct lfs *fs = ump->um_lfs;
1574 ump->umq2_bsize = lfs_sb_getbsize(fs);
1575 ump->umq2_bmask = lfs_sb_getbmask(fs);
1599 ump->um_quotas[ULFS_USRQUOTA] == NULLVP) {
1607 ump->um_quotas[ULFS_USRQUOTA] = vp;
1608 ump->um_cred[ULFS_USRQUOTA] = l->l_cred;
1615 ump->um_quotas[ULFS_GRPQUOTA] == NULLVP) {
1619 vn_close(ump->um_quotas[ULFS_USRQUOTA],
1625 ump->um_quotas[ULFS_GRPQUOTA] = vp;
1626 ump->um_cred[ULFS_GRPQUOTA] = l->l_cred;