Lines Matching refs:dqp
42 xfs_dquot_t *dqp) in xfs_trans_dqjoin() argument
44 ASSERT(dqp->q_transp != tp); in xfs_trans_dqjoin()
45 ASSERT(XFS_DQ_IS_LOCKED(dqp)); in xfs_trans_dqjoin()
46 ASSERT(dqp->q_logitem.qli_dquot == dqp); in xfs_trans_dqjoin()
51 xfs_trans_add_item(tp, &dqp->q_logitem.qli_item); in xfs_trans_dqjoin()
57 dqp->q_transp = tp; in xfs_trans_dqjoin()
74 xfs_dquot_t *dqp) in xfs_trans_log_dquot() argument
76 ASSERT(dqp->q_transp == tp); in xfs_trans_log_dquot()
77 ASSERT(XFS_DQ_IS_LOCKED(dqp)); in xfs_trans_log_dquot()
80 dqp->q_logitem.qli_item.li_desc->lid_flags |= XFS_LID_DIRTY; in xfs_trans_log_dquot()
169 struct xfs_dquot *dqp) in xfs_trans_get_dqtrx() argument
174 if (XFS_QM_ISUDQ(dqp)) in xfs_trans_get_dqtrx()
176 else if (XFS_QM_ISGDQ(dqp)) in xfs_trans_get_dqtrx()
178 else if (XFS_QM_ISPDQ(dqp)) in xfs_trans_get_dqtrx()
185 qa[i].qt_dquot == dqp) in xfs_trans_get_dqtrx()
201 xfs_dquot_t *dqp, in xfs_trans_mod_dquot() argument
217 qtrx = xfs_trans_get_dqtrx(tp, dqp); in xfs_trans_mod_dquot()
220 qtrx->qt_dquot = dqp; in xfs_trans_mod_dquot()
330 struct xfs_dquot *dqp; in xfs_trans_apply_dquot_deltas() local
356 if ((dqp = qtrx->qt_dquot) == NULL) in xfs_trans_apply_dquot_deltas()
359 ASSERT(XFS_DQ_IS_LOCKED(dqp)); in xfs_trans_apply_dquot_deltas()
360 ASSERT(dqp->q_transp == tp); in xfs_trans_apply_dquot_deltas()
365 d = &dqp->q_core; in xfs_trans_apply_dquot_deltas()
411 xfs_qm_adjust_dqlimits(tp->t_mountp, dqp); in xfs_trans_apply_dquot_deltas()
415 dqp->dq_flags |= XFS_DQ_DIRTY; in xfs_trans_apply_dquot_deltas()
419 xfs_trans_log_dquot(tp, dqp); in xfs_trans_apply_dquot_deltas()
429 dqp->q_res_bcount -= (xfs_qcnt_t) in xfs_trans_apply_dquot_deltas()
433 dqp->q_res_bcount -= (xfs_qcnt_t) in xfs_trans_apply_dquot_deltas()
446 dqp->q_res_bcount += in xfs_trans_apply_dquot_deltas()
457 dqp->q_res_rtbcount -= (xfs_qcnt_t) in xfs_trans_apply_dquot_deltas()
461 dqp->q_res_rtbcount -= (xfs_qcnt_t) in xfs_trans_apply_dquot_deltas()
467 dqp->q_res_rtbcount += in xfs_trans_apply_dquot_deltas()
478 dqp->q_res_icount -= (xfs_qcnt_t) in xfs_trans_apply_dquot_deltas()
483 dqp->q_res_icount += in xfs_trans_apply_dquot_deltas()
487 ASSERT(dqp->q_res_bcount >= in xfs_trans_apply_dquot_deltas()
488 be64_to_cpu(dqp->q_core.d_bcount)); in xfs_trans_apply_dquot_deltas()
489 ASSERT(dqp->q_res_icount >= in xfs_trans_apply_dquot_deltas()
490 be64_to_cpu(dqp->q_core.d_icount)); in xfs_trans_apply_dquot_deltas()
491 ASSERT(dqp->q_res_rtbcount >= in xfs_trans_apply_dquot_deltas()
492 be64_to_cpu(dqp->q_core.d_rtbcount)); in xfs_trans_apply_dquot_deltas()
509 xfs_dquot_t *dqp; in xfs_trans_unreserve_and_mod_dquots() local
525 if ((dqp = qtrx->qt_dquot) == NULL) in xfs_trans_unreserve_and_mod_dquots()
534 xfs_dqlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
536 dqp->q_res_bcount -= in xfs_trans_unreserve_and_mod_dquots()
541 xfs_dqlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
544 dqp->q_res_icount -= in xfs_trans_unreserve_and_mod_dquots()
550 xfs_dqlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
553 dqp->q_res_rtbcount -= in xfs_trans_unreserve_and_mod_dquots()
557 xfs_dqunlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
566 struct xfs_dquot *dqp, in xfs_quota_warn() argument
570 if (dqp->dq_flags & XFS_DQ_PROJ) in xfs_quota_warn()
573 (dqp->dq_flags & XFS_DQ_USER) ? in xfs_quota_warn()
575 be32_to_cpu(dqp->q_core.d_id)), in xfs_quota_warn()
589 xfs_dquot_t *dqp, in xfs_trans_dqresv() argument
604 xfs_dqlock(dqp); in xfs_trans_dqresv()
607 hardlimit = be64_to_cpu(dqp->q_core.d_blk_hardlimit); in xfs_trans_dqresv()
610 softlimit = be64_to_cpu(dqp->q_core.d_blk_softlimit); in xfs_trans_dqresv()
613 timer = be32_to_cpu(dqp->q_core.d_btimer); in xfs_trans_dqresv()
614 warns = be16_to_cpu(dqp->q_core.d_bwarns); in xfs_trans_dqresv()
615 warnlimit = dqp->q_mount->m_quotainfo->qi_bwarnlimit; in xfs_trans_dqresv()
616 resbcountp = &dqp->q_res_bcount; in xfs_trans_dqresv()
619 hardlimit = be64_to_cpu(dqp->q_core.d_rtb_hardlimit); in xfs_trans_dqresv()
622 softlimit = be64_to_cpu(dqp->q_core.d_rtb_softlimit); in xfs_trans_dqresv()
625 timer = be32_to_cpu(dqp->q_core.d_rtbtimer); in xfs_trans_dqresv()
626 warns = be16_to_cpu(dqp->q_core.d_rtbwarns); in xfs_trans_dqresv()
627 warnlimit = dqp->q_mount->m_quotainfo->qi_rtbwarnlimit; in xfs_trans_dqresv()
628 resbcountp = &dqp->q_res_rtbcount; in xfs_trans_dqresv()
632 dqp->q_core.d_id && in xfs_trans_dqresv()
633 ((XFS_IS_UQUOTA_ENFORCED(dqp->q_mount) && XFS_QM_ISUDQ(dqp)) || in xfs_trans_dqresv()
634 (XFS_IS_GQUOTA_ENFORCED(dqp->q_mount) && XFS_QM_ISGDQ(dqp)) || in xfs_trans_dqresv()
635 (XFS_IS_PQUOTA_ENFORCED(dqp->q_mount) && XFS_QM_ISPDQ(dqp)))) { in xfs_trans_dqresv()
644 xfs_quota_warn(mp, dqp, QUOTA_NL_BHARDWARN); in xfs_trans_dqresv()
650 xfs_quota_warn(mp, dqp, in xfs_trans_dqresv()
655 xfs_quota_warn(mp, dqp, QUOTA_NL_BSOFTWARN); in xfs_trans_dqresv()
659 total_count = be64_to_cpu(dqp->q_core.d_icount) + ninos; in xfs_trans_dqresv()
660 timer = be32_to_cpu(dqp->q_core.d_itimer); in xfs_trans_dqresv()
661 warns = be16_to_cpu(dqp->q_core.d_iwarns); in xfs_trans_dqresv()
662 warnlimit = dqp->q_mount->m_quotainfo->qi_iwarnlimit; in xfs_trans_dqresv()
663 hardlimit = be64_to_cpu(dqp->q_core.d_ino_hardlimit); in xfs_trans_dqresv()
666 softlimit = be64_to_cpu(dqp->q_core.d_ino_softlimit); in xfs_trans_dqresv()
671 xfs_quota_warn(mp, dqp, QUOTA_NL_IHARDWARN); in xfs_trans_dqresv()
677 xfs_quota_warn(mp, dqp, in xfs_trans_dqresv()
681 xfs_quota_warn(mp, dqp, QUOTA_NL_ISOFTWARN); in xfs_trans_dqresv()
692 dqp->q_res_icount += (xfs_qcnt_t)ninos; in xfs_trans_dqresv()
705 xfs_trans_mod_dquot(tp, dqp, in xfs_trans_dqresv()
709 xfs_trans_mod_dquot(tp, dqp, in xfs_trans_dqresv()
713 ASSERT(dqp->q_res_bcount >= be64_to_cpu(dqp->q_core.d_bcount)); in xfs_trans_dqresv()
714 ASSERT(dqp->q_res_rtbcount >= be64_to_cpu(dqp->q_core.d_rtbcount)); in xfs_trans_dqresv()
715 ASSERT(dqp->q_res_icount >= be64_to_cpu(dqp->q_core.d_icount)); in xfs_trans_dqresv()
717 xfs_dqunlock(dqp); in xfs_trans_dqresv()
721 xfs_dqunlock(dqp); in xfs_trans_dqresv()