Lines Matching refs:dqp

30 	struct xfs_dquot	*dqp)  in xfs_trans_dqjoin()  argument
32 ASSERT(XFS_DQ_IS_LOCKED(dqp)); in xfs_trans_dqjoin()
33 ASSERT(dqp->q_logitem.qli_dquot == dqp); in xfs_trans_dqjoin()
38 xfs_trans_add_item(tp, &dqp->q_logitem.qli_item); in xfs_trans_dqjoin()
54 struct xfs_dquot *dqp) in xfs_trans_log_dquot() argument
56 ASSERT(XFS_DQ_IS_LOCKED(dqp)); in xfs_trans_log_dquot()
59 if (dqp->q_id != 0 && in xfs_trans_log_dquot()
61 !(dqp->q_type & XFS_DQTYPE_BIGTIME)) in xfs_trans_log_dquot()
62 dqp->q_type |= XFS_DQTYPE_BIGTIME; in xfs_trans_log_dquot()
65 set_bit(XFS_LI_DIRTY, &dqp->q_logitem.qli_item.li_flags); in xfs_trans_log_dquot()
160 struct xfs_dquot *dqp) in xfs_trans_get_dqtrx() argument
165 switch (xfs_dquot_type(dqp)) { in xfs_trans_get_dqtrx()
181 qa[i].qt_dquot == dqp) in xfs_trans_get_dqtrx()
197 struct xfs_dquot *dqp, in xfs_trans_mod_dquot() argument
213 qtrx = xfs_trans_get_dqtrx(tp, dqp); in xfs_trans_mod_dquot()
216 qtrx->qt_dquot = dqp; in xfs_trans_mod_dquot()
220 trace_xfs_trans_mod_dquot(tp, dqp, field, delta); in xfs_trans_mod_dquot()
349 struct xfs_dquot *dqp; in xfs_trans_apply_dquot_deltas() local
376 if ((dqp = qtrx->qt_dquot) == NULL) in xfs_trans_apply_dquot_deltas()
379 ASSERT(XFS_DQ_IS_LOCKED(dqp)); in xfs_trans_apply_dquot_deltas()
405 trace_xfs_trans_apply_dquot_deltas_before(dqp); in xfs_trans_apply_dquot_deltas()
411 ASSERT(dqp->q_blk.count >= -totalbdelta); in xfs_trans_apply_dquot_deltas()
414 ASSERT(dqp->q_rtb.count >= -totalrtbdelta); in xfs_trans_apply_dquot_deltas()
417 ASSERT(dqp->q_ino.count >= -qtrx->qt_icount_delta); in xfs_trans_apply_dquot_deltas()
420 dqp->q_blk.count += totalbdelta; in xfs_trans_apply_dquot_deltas()
423 dqp->q_ino.count += qtrx->qt_icount_delta; in xfs_trans_apply_dquot_deltas()
426 dqp->q_rtb.count += totalrtbdelta; in xfs_trans_apply_dquot_deltas()
430 trace_xfs_trans_apply_dquot_deltas_after(dqp); in xfs_trans_apply_dquot_deltas()
436 if (dqp->q_id) { in xfs_trans_apply_dquot_deltas()
437 xfs_qm_adjust_dqlimits(dqp); in xfs_trans_apply_dquot_deltas()
438 xfs_qm_adjust_dqtimers(dqp); in xfs_trans_apply_dquot_deltas()
441 dqp->q_flags |= XFS_DQFLAG_DIRTY; in xfs_trans_apply_dquot_deltas()
445 xfs_trans_log_dquot(tp, dqp); in xfs_trans_apply_dquot_deltas()
452 xfs_apply_quota_reservation_deltas(&dqp->q_blk, in xfs_trans_apply_dquot_deltas()
459 xfs_apply_quota_reservation_deltas(&dqp->q_rtb, in xfs_trans_apply_dquot_deltas()
468 xfs_apply_quota_reservation_deltas(&dqp->q_ino, in xfs_trans_apply_dquot_deltas()
473 ASSERT(dqp->q_blk.reserved >= dqp->q_blk.count); in xfs_trans_apply_dquot_deltas()
474 ASSERT(dqp->q_ino.reserved >= dqp->q_ino.count); in xfs_trans_apply_dquot_deltas()
475 ASSERT(dqp->q_rtb.reserved >= dqp->q_rtb.count); in xfs_trans_apply_dquot_deltas()
492 struct xfs_dquot *dqp; in xfs_trans_unreserve_and_mod_dquots() local
508 if ((dqp = qtrx->qt_dquot) == NULL) in xfs_trans_unreserve_and_mod_dquots()
517 xfs_dqlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
519 dqp->q_blk.reserved -= in xfs_trans_unreserve_and_mod_dquots()
524 xfs_dqlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
527 dqp->q_ino.reserved -= in xfs_trans_unreserve_and_mod_dquots()
533 xfs_dqlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
536 dqp->q_rtb.reserved -= in xfs_trans_unreserve_and_mod_dquots()
540 xfs_dqunlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
549 struct xfs_dquot *dqp, in xfs_quota_warn() argument
554 switch (xfs_dquot_type(dqp)) { in xfs_quota_warn()
568 quota_send_warning(make_kqid(&init_user_ns, qtype, dqp->q_id), in xfs_quota_warn()
634 struct xfs_dquot *dqp, in xfs_trans_dqresv() argument
644 xfs_dqlock(dqp); in xfs_trans_dqresv()
646 defq = xfs_get_defquota(q, xfs_dquot_type(dqp)); in xfs_trans_dqresv()
649 blkres = &dqp->q_blk; in xfs_trans_dqresv()
652 blkres = &dqp->q_rtb; in xfs_trans_dqresv()
656 if ((flags & XFS_QMOPT_FORCE_RES) == 0 && dqp->q_id && in xfs_trans_dqresv()
657 xfs_dquot_is_enforced(dqp)) { in xfs_trans_dqresv()
671 xfs_quota_warn(mp, dqp, quota_nl + 3); in xfs_trans_dqresv()
676 quota_nl = xfs_dqresv_check(&dqp->q_ino, &defq->ino, ninos, in xfs_trans_dqresv()
679 xfs_quota_warn(mp, dqp, quota_nl); in xfs_trans_dqresv()
690 dqp->q_ino.reserved += (xfs_qcnt_t)ninos; in xfs_trans_dqresv()
703 xfs_trans_mod_dquot(tp, dqp, in xfs_trans_dqresv()
707 xfs_trans_mod_dquot(tp, dqp, in xfs_trans_dqresv()
711 ASSERT(dqp->q_blk.reserved >= dqp->q_blk.count); in xfs_trans_dqresv()
712 ASSERT(dqp->q_rtb.reserved >= dqp->q_rtb.count); in xfs_trans_dqresv()
713 ASSERT(dqp->q_ino.reserved >= dqp->q_ino.count); in xfs_trans_dqresv()
715 xfs_dqunlock(dqp); in xfs_trans_dqresv()
719 xfs_dqunlock(dqp); in xfs_trans_dqresv()
720 if (xfs_dquot_type(dqp) == XFS_DQTYPE_PROJ) in xfs_trans_dqresv()