• Home
  • Raw
  • Download

Lines Matching refs:dqp

31 	struct xfs_dquot	*dqp)  in xfs_trans_dqjoin()  argument
33 ASSERT(XFS_DQ_IS_LOCKED(dqp)); in xfs_trans_dqjoin()
34 ASSERT(dqp->q_logitem.qli_dquot == dqp); in xfs_trans_dqjoin()
39 xfs_trans_add_item(tp, &dqp->q_logitem.qli_item); in xfs_trans_dqjoin()
55 struct xfs_dquot *dqp) in xfs_trans_log_dquot() argument
57 ASSERT(XFS_DQ_IS_LOCKED(dqp)); in xfs_trans_log_dquot()
60 if (dqp->q_id != 0 && in xfs_trans_log_dquot()
62 !(dqp->q_type & XFS_DQTYPE_BIGTIME)) in xfs_trans_log_dquot()
63 dqp->q_type |= XFS_DQTYPE_BIGTIME; in xfs_trans_log_dquot()
66 set_bit(XFS_LI_DIRTY, &dqp->q_logitem.qli_item.li_flags); in xfs_trans_log_dquot()
161 struct xfs_dquot *dqp) in xfs_trans_get_dqtrx() argument
166 switch (xfs_dquot_type(dqp)) { in xfs_trans_get_dqtrx()
182 qa[i].qt_dquot == dqp) in xfs_trans_get_dqtrx()
198 struct xfs_dquot *dqp, in xfs_trans_mod_dquot() argument
214 qtrx = xfs_trans_get_dqtrx(tp, dqp); in xfs_trans_mod_dquot()
217 qtrx->qt_dquot = dqp; in xfs_trans_mod_dquot()
221 trace_xfs_trans_mod_dquot(tp, dqp, field, delta); in xfs_trans_mod_dquot()
350 struct xfs_dquot *dqp; in xfs_trans_apply_dquot_deltas() local
377 if ((dqp = qtrx->qt_dquot) == NULL) in xfs_trans_apply_dquot_deltas()
380 ASSERT(XFS_DQ_IS_LOCKED(dqp)); in xfs_trans_apply_dquot_deltas()
406 trace_xfs_trans_apply_dquot_deltas_before(dqp); in xfs_trans_apply_dquot_deltas()
412 ASSERT(dqp->q_blk.count >= -totalbdelta); in xfs_trans_apply_dquot_deltas()
415 ASSERT(dqp->q_rtb.count >= -totalrtbdelta); in xfs_trans_apply_dquot_deltas()
418 ASSERT(dqp->q_ino.count >= -qtrx->qt_icount_delta); in xfs_trans_apply_dquot_deltas()
421 dqp->q_blk.count += totalbdelta; in xfs_trans_apply_dquot_deltas()
424 dqp->q_ino.count += qtrx->qt_icount_delta; in xfs_trans_apply_dquot_deltas()
427 dqp->q_rtb.count += totalrtbdelta; in xfs_trans_apply_dquot_deltas()
431 trace_xfs_trans_apply_dquot_deltas_after(dqp); in xfs_trans_apply_dquot_deltas()
437 if (dqp->q_id) { in xfs_trans_apply_dquot_deltas()
438 xfs_qm_adjust_dqlimits(dqp); in xfs_trans_apply_dquot_deltas()
439 xfs_qm_adjust_dqtimers(dqp); in xfs_trans_apply_dquot_deltas()
442 dqp->q_flags |= XFS_DQFLAG_DIRTY; in xfs_trans_apply_dquot_deltas()
446 xfs_trans_log_dquot(tp, dqp); in xfs_trans_apply_dquot_deltas()
453 xfs_apply_quota_reservation_deltas(&dqp->q_blk, in xfs_trans_apply_dquot_deltas()
460 xfs_apply_quota_reservation_deltas(&dqp->q_rtb, in xfs_trans_apply_dquot_deltas()
469 xfs_apply_quota_reservation_deltas(&dqp->q_ino, in xfs_trans_apply_dquot_deltas()
474 ASSERT(dqp->q_blk.reserved >= dqp->q_blk.count); in xfs_trans_apply_dquot_deltas()
475 ASSERT(dqp->q_ino.reserved >= dqp->q_ino.count); in xfs_trans_apply_dquot_deltas()
476 ASSERT(dqp->q_rtb.reserved >= dqp->q_rtb.count); in xfs_trans_apply_dquot_deltas()
493 struct xfs_dquot *dqp; in xfs_trans_unreserve_and_mod_dquots() local
509 if ((dqp = qtrx->qt_dquot) == NULL) in xfs_trans_unreserve_and_mod_dquots()
518 xfs_dqlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
520 dqp->q_blk.reserved -= in xfs_trans_unreserve_and_mod_dquots()
525 xfs_dqlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
528 dqp->q_ino.reserved -= in xfs_trans_unreserve_and_mod_dquots()
534 xfs_dqlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
537 dqp->q_rtb.reserved -= in xfs_trans_unreserve_and_mod_dquots()
541 xfs_dqunlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
550 struct xfs_dquot *dqp, in xfs_quota_warn() argument
555 switch (xfs_dquot_type(dqp)) { in xfs_quota_warn()
569 quota_send_warning(make_kqid(&init_user_ns, qtype, dqp->q_id), in xfs_quota_warn()
635 struct xfs_dquot *dqp, in xfs_trans_dqresv() argument
645 xfs_dqlock(dqp); in xfs_trans_dqresv()
647 defq = xfs_get_defquota(q, xfs_dquot_type(dqp)); in xfs_trans_dqresv()
650 blkres = &dqp->q_blk; in xfs_trans_dqresv()
653 blkres = &dqp->q_rtb; in xfs_trans_dqresv()
657 if ((flags & XFS_QMOPT_FORCE_RES) == 0 && dqp->q_id && in xfs_trans_dqresv()
658 xfs_dquot_is_enforced(dqp)) { in xfs_trans_dqresv()
672 xfs_quota_warn(mp, dqp, quota_nl + 3); in xfs_trans_dqresv()
677 quota_nl = xfs_dqresv_check(&dqp->q_ino, &defq->ino, ninos, in xfs_trans_dqresv()
680 xfs_quota_warn(mp, dqp, quota_nl); in xfs_trans_dqresv()
691 dqp->q_ino.reserved += (xfs_qcnt_t)ninos; in xfs_trans_dqresv()
704 xfs_trans_mod_dquot(tp, dqp, in xfs_trans_dqresv()
708 xfs_trans_mod_dquot(tp, dqp, in xfs_trans_dqresv()
713 if (XFS_IS_CORRUPT(mp, dqp->q_blk.reserved < dqp->q_blk.count) || in xfs_trans_dqresv()
714 XFS_IS_CORRUPT(mp, dqp->q_rtb.reserved < dqp->q_rtb.count) || in xfs_trans_dqresv()
715 XFS_IS_CORRUPT(mp, dqp->q_ino.reserved < dqp->q_ino.count)) in xfs_trans_dqresv()
718 xfs_dqunlock(dqp); in xfs_trans_dqresv()
722 xfs_dqunlock(dqp); in xfs_trans_dqresv()
723 if (xfs_dquot_type(dqp) == XFS_DQTYPE_PROJ) in xfs_trans_dqresv()
727 xfs_dqunlock(dqp); in xfs_trans_dqresv()