Lines Matching defs:dqp

37 STATIC void	xfs_qm_dqfree_one(struct xfs_dquot *dqp);
51 int (*execute)(struct xfs_dquot *dqp, void *data),
80 struct xfs_dquot *dqp = batch[i];
82 next_index = dqp->q_id + 1;
119 struct xfs_dquot *dqp,
122 struct xfs_mount *mp = dqp->q_mount;
126 xfs_dqlock(dqp);
127 if ((dqp->q_flags & XFS_DQFLAG_FREEING) || dqp->q_nrefs != 0)
130 dqp->q_flags |= XFS_DQFLAG_FREEING;
132 xfs_dqflock(dqp);
139 if (XFS_DQ_IS_DIRTY(dqp)) {
146 error = xfs_qm_dqflush(dqp, &bp);
151 dqp->q_flags &= ~XFS_DQFLAG_FREEING;
154 xfs_dqflock(dqp);
157 ASSERT(atomic_read(&dqp->q_pincount) == 0);
159 !test_bit(XFS_LI_IN_AIL, &dqp->q_logitem.qli_item.li_flags));
161 xfs_dqfunlock(dqp);
162 xfs_dqunlock(dqp);
164 radix_tree_delete(xfs_dquot_tree(qi, xfs_dquot_type(dqp)), dqp->q_id);
171 ASSERT(!list_empty(&dqp->q_lru));
172 list_lru_del(&qi->qi_lru, &dqp->q_lru);
175 xfs_qm_dqdestroy(dqp);
179 xfs_dqunlock(dqp);
256 struct xfs_dquot *dqp;
267 dqp = *IO_idqpp;
268 if (dqp) {
269 trace_xfs_dqattach_found(dqp);
279 error = xfs_qm_dqget_inode(ip, type, doalloc, &dqp);
283 trace_xfs_dqattach_get(dqp);
289 *IO_idqpp = dqp;
290 xfs_dqunlock(dqp);
422 struct xfs_dquot *dqp = container_of(item,
426 if (!xfs_dqlock_nowait(dqp))
433 if (dqp->q_nrefs) {
434 xfs_dqunlock(dqp);
435 XFS_STATS_INC(dqp->q_mount, xs_qm_dqwants);
437 trace_xfs_dqreclaim_want(dqp);
438 list_lru_isolate(lru, &dqp->q_lru);
439 XFS_STATS_DEC(dqp->q_mount, xs_qm_dquot_unused);
448 if (!xfs_dqflock_nowait(dqp)) {
449 xfs_dqunlock(dqp);
453 if (XFS_DQ_IS_DIRTY(dqp)) {
457 trace_xfs_dqreclaim_dirty(dqp);
462 error = xfs_qm_dqflush(dqp, &bp);
470 xfs_dqfunlock(dqp);
475 dqp->q_flags |= XFS_DQFLAG_FREEING;
476 xfs_dqunlock(dqp);
478 ASSERT(dqp->q_nrefs == 0);
479 list_lru_isolate_move(lru, &dqp->q_lru, &isol->dispose);
480 XFS_STATS_DEC(dqp->q_mount, xs_qm_dquot_unused);
481 trace_xfs_dqreclaim_done(dqp);
482 XFS_STATS_INC(dqp->q_mount, xs_qm_dqreclaims);
486 trace_xfs_dqreclaim_busy(dqp);
487 XFS_STATS_INC(dqp->q_mount, xs_qm_dqreclaim_misses);
491 trace_xfs_dqreclaim_busy(dqp);
492 XFS_STATS_INC(dqp->q_mount, xs_qm_dqreclaim_misses);
493 xfs_dqunlock(dqp);
523 struct xfs_dquot *dqp;
525 dqp = list_first_entry(&isol.dispose, struct xfs_dquot, q_lru);
526 list_del_init(&dqp->q_lru);
527 xfs_qm_dqfree_one(dqp);
550 struct xfs_dquot *dqp;
554 error = xfs_qm_dqget_uncached(mp, 0, type, &dqp);
558 defq = xfs_get_defquota(qinf, xfs_dquot_type(dqp));
564 defq->blk.hard = dqp->q_blk.hardlimit;
565 defq->blk.soft = dqp->q_blk.softlimit;
566 defq->ino.hard = dqp->q_ino.hardlimit;
567 defq->ino.soft = dqp->q_ino.softlimit;
568 defq->rtb.hard = dqp->q_rtb.hardlimit;
569 defq->rtb.soft = dqp->q_rtb.softlimit;
570 xfs_qm_dqdestroy(dqp);
581 struct xfs_dquot *dqp;
600 error = xfs_qm_dqget_uncached(mp, 0, type, &dqp);
609 if (dqp->q_blk.timer)
610 defq->blk.time = dqp->q_blk.timer;
611 if (dqp->q_ino.timer)
612 defq->ino.time = dqp->q_ino.timer;
613 if (dqp->q_rtb.timer)
614 defq->rtb.time = dqp->q_rtb.timer;
615 if (dqp->q_blk.warnings)
616 defq->blk.warn = dqp->q_blk.warnings;
617 if (dqp->q_ino.warnings)
618 defq->ino.warn = dqp->q_ino.warnings;
619 if (dqp->q_rtb.warnings)
620 defq->rtb.warn = dqp->q_rtb.warnings;
622 xfs_qm_dqdestroy(dqp);
1079 struct xfs_dquot *dqp;
1084 error = xfs_qm_dqget(mp, id, type, true, &dqp);
1094 trace_xfs_dqadjust(dqp);
1100 dqp->q_ino.count++;
1101 dqp->q_ino.reserved++;
1103 dqp->q_blk.count += nblks;
1104 dqp->q_blk.reserved += nblks;
1107 dqp->q_rtb.count += rtblks;
1108 dqp->q_rtb.reserved += rtblks;
1116 if (dqp->q_id) {
1117 xfs_qm_adjust_dqlimits(dqp);
1118 xfs_qm_adjust_dqtimers(dqp);
1121 dqp->q_flags |= XFS_DQFLAG_DIRTY;
1122 xfs_qm_dqput(dqp);
1218 struct xfs_dquot *dqp,
1221 struct xfs_mount *mp = dqp->q_mount;
1226 xfs_dqlock(dqp);
1227 if (dqp->q_flags & XFS_DQFLAG_FREEING)
1229 if (!XFS_DQ_IS_DIRTY(dqp))
1240 if (!xfs_dqflock_nowait(dqp)) {
1242 bp = xfs_buf_incore(mp->m_ddev_targp, dqp->q_blkno,
1257 error = xfs_qm_dqflush(dqp, &bp);
1264 xfs_dqunlock(dqp);
1603 struct xfs_dquot *dqp)
1605 struct xfs_mount *mp = dqp->q_mount;
1609 radix_tree_delete(xfs_dquot_tree(qi, xfs_dquot_type(dqp)), dqp->q_id);
1614 xfs_qm_dqdestroy(dqp);