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()
175 struct xfs_dquot *dqp) in xfs_trans_get_dqtrx() argument
180 if (XFS_QM_ISUDQ(dqp)) in xfs_trans_get_dqtrx()
182 else if (XFS_QM_ISGDQ(dqp)) in xfs_trans_get_dqtrx()
184 else if (XFS_QM_ISPDQ(dqp)) in xfs_trans_get_dqtrx()
191 qa[i].qt_dquot == dqp) in xfs_trans_get_dqtrx()
207 xfs_dquot_t *dqp, in xfs_trans_mod_dquot() argument
223 qtrx = xfs_trans_get_dqtrx(tp, dqp); in xfs_trans_mod_dquot()
226 qtrx->qt_dquot = dqp; in xfs_trans_mod_dquot()
332 struct xfs_dquot *dqp; in xfs_trans_apply_dquot_deltas() local
358 if ((dqp = qtrx->qt_dquot) == NULL) in xfs_trans_apply_dquot_deltas()
361 ASSERT(XFS_DQ_IS_LOCKED(dqp)); in xfs_trans_apply_dquot_deltas()
362 ASSERT(dqp->q_transp == tp); in xfs_trans_apply_dquot_deltas()
367 d = &dqp->q_core; in xfs_trans_apply_dquot_deltas()
413 xfs_qm_adjust_dqlimits(tp->t_mountp, dqp); in xfs_trans_apply_dquot_deltas()
417 dqp->dq_flags |= XFS_DQ_DIRTY; in xfs_trans_apply_dquot_deltas()
421 xfs_trans_log_dquot(tp, dqp); in xfs_trans_apply_dquot_deltas()
435 dqp->q_res_bcount -= (xfs_qcnt_t) in xfs_trans_apply_dquot_deltas()
439 dqp->q_res_bcount -= (xfs_qcnt_t) in xfs_trans_apply_dquot_deltas()
452 dqp->q_res_bcount += in xfs_trans_apply_dquot_deltas()
463 dqp->q_res_rtbcount -= (xfs_qcnt_t) in xfs_trans_apply_dquot_deltas()
467 dqp->q_res_rtbcount -= (xfs_qcnt_t) in xfs_trans_apply_dquot_deltas()
473 dqp->q_res_rtbcount += in xfs_trans_apply_dquot_deltas()
484 dqp->q_res_icount -= (xfs_qcnt_t) in xfs_trans_apply_dquot_deltas()
489 dqp->q_res_icount += in xfs_trans_apply_dquot_deltas()
493 ASSERT(dqp->q_res_bcount >= in xfs_trans_apply_dquot_deltas()
494 be64_to_cpu(dqp->q_core.d_bcount)); in xfs_trans_apply_dquot_deltas()
495 ASSERT(dqp->q_res_icount >= in xfs_trans_apply_dquot_deltas()
496 be64_to_cpu(dqp->q_core.d_icount)); in xfs_trans_apply_dquot_deltas()
497 ASSERT(dqp->q_res_rtbcount >= in xfs_trans_apply_dquot_deltas()
498 be64_to_cpu(dqp->q_core.d_rtbcount)); in xfs_trans_apply_dquot_deltas()
515 xfs_dquot_t *dqp; in xfs_trans_unreserve_and_mod_dquots() local
531 if ((dqp = qtrx->qt_dquot) == NULL) in xfs_trans_unreserve_and_mod_dquots()
540 xfs_dqlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
542 dqp->q_res_bcount -= in xfs_trans_unreserve_and_mod_dquots()
547 xfs_dqlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
550 dqp->q_res_icount -= in xfs_trans_unreserve_and_mod_dquots()
556 xfs_dqlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
559 dqp->q_res_rtbcount -= in xfs_trans_unreserve_and_mod_dquots()
563 xfs_dqunlock(dqp); in xfs_trans_unreserve_and_mod_dquots()
572 struct xfs_dquot *dqp, in xfs_quota_warn() argument
576 if (dqp->dq_flags & XFS_DQ_PROJ) in xfs_quota_warn()
579 (dqp->dq_flags & XFS_DQ_USER) ? in xfs_quota_warn()
581 be32_to_cpu(dqp->q_core.d_id)), in xfs_quota_warn()
595 xfs_dquot_t *dqp, in xfs_trans_dqresv() argument
610 xfs_dqlock(dqp); in xfs_trans_dqresv()
613 hardlimit = be64_to_cpu(dqp->q_core.d_blk_hardlimit); in xfs_trans_dqresv()
616 softlimit = be64_to_cpu(dqp->q_core.d_blk_softlimit); in xfs_trans_dqresv()
619 timer = be32_to_cpu(dqp->q_core.d_btimer); in xfs_trans_dqresv()
620 warns = be16_to_cpu(dqp->q_core.d_bwarns); in xfs_trans_dqresv()
621 warnlimit = dqp->q_mount->m_quotainfo->qi_bwarnlimit; in xfs_trans_dqresv()
622 resbcountp = &dqp->q_res_bcount; in xfs_trans_dqresv()
625 hardlimit = be64_to_cpu(dqp->q_core.d_rtb_hardlimit); in xfs_trans_dqresv()
628 softlimit = be64_to_cpu(dqp->q_core.d_rtb_softlimit); in xfs_trans_dqresv()
631 timer = be32_to_cpu(dqp->q_core.d_rtbtimer); in xfs_trans_dqresv()
632 warns = be16_to_cpu(dqp->q_core.d_rtbwarns); in xfs_trans_dqresv()
633 warnlimit = dqp->q_mount->m_quotainfo->qi_rtbwarnlimit; in xfs_trans_dqresv()
634 resbcountp = &dqp->q_res_rtbcount; in xfs_trans_dqresv()
638 dqp->q_core.d_id && in xfs_trans_dqresv()
639 ((XFS_IS_UQUOTA_ENFORCED(dqp->q_mount) && XFS_QM_ISUDQ(dqp)) || in xfs_trans_dqresv()
640 (XFS_IS_GQUOTA_ENFORCED(dqp->q_mount) && XFS_QM_ISGDQ(dqp)) || in xfs_trans_dqresv()
641 (XFS_IS_PQUOTA_ENFORCED(dqp->q_mount) && XFS_QM_ISPDQ(dqp)))) { in xfs_trans_dqresv()
650 xfs_quota_warn(mp, dqp, QUOTA_NL_BHARDWARN); in xfs_trans_dqresv()
656 xfs_quota_warn(mp, dqp, in xfs_trans_dqresv()
661 xfs_quota_warn(mp, dqp, QUOTA_NL_BSOFTWARN); in xfs_trans_dqresv()
665 total_count = be64_to_cpu(dqp->q_core.d_icount) + ninos; in xfs_trans_dqresv()
666 timer = be32_to_cpu(dqp->q_core.d_itimer); in xfs_trans_dqresv()
667 warns = be16_to_cpu(dqp->q_core.d_iwarns); in xfs_trans_dqresv()
668 warnlimit = dqp->q_mount->m_quotainfo->qi_iwarnlimit; in xfs_trans_dqresv()
669 hardlimit = be64_to_cpu(dqp->q_core.d_ino_hardlimit); in xfs_trans_dqresv()
672 softlimit = be64_to_cpu(dqp->q_core.d_ino_softlimit); in xfs_trans_dqresv()
677 xfs_quota_warn(mp, dqp, QUOTA_NL_IHARDWARN); in xfs_trans_dqresv()
683 xfs_quota_warn(mp, dqp, in xfs_trans_dqresv()
687 xfs_quota_warn(mp, dqp, QUOTA_NL_ISOFTWARN); in xfs_trans_dqresv()
698 dqp->q_res_icount += (xfs_qcnt_t)ninos; in xfs_trans_dqresv()
711 xfs_trans_mod_dquot(tp, dqp, in xfs_trans_dqresv()
715 xfs_trans_mod_dquot(tp, dqp, in xfs_trans_dqresv()
719 ASSERT(dqp->q_res_bcount >= be64_to_cpu(dqp->q_core.d_bcount)); in xfs_trans_dqresv()
720 ASSERT(dqp->q_res_rtbcount >= be64_to_cpu(dqp->q_core.d_rtbcount)); in xfs_trans_dqresv()
721 ASSERT(dqp->q_res_icount >= be64_to_cpu(dqp->q_core.d_icount)); in xfs_trans_dqresv()
723 xfs_dqunlock(dqp); in xfs_trans_dqresv()
727 xfs_dqunlock(dqp); in xfs_trans_dqresv()