58 int xfs_dqerror_mod = 33;
76 kmem_zone_free(xfs_qm_dqzone, dqp);
149 mp->m_quotainfo->qi_btimelimit);
172 mp->m_quotainfo->qi_itimelimit);
195 mp->m_quotainfo->qi_rtbtimelimit);
241 d->dd_diskdq.d_flags =
type;
269 int nmaps,
error, committed;
271 xfs_trans_t *tp = *tpp;
275 trace_xfs_dqalloc(dqp);
280 xfs_bmap_init(&flist, &firstblock);
296 &map, &nmaps, &flist);
310 bp = xfs_trans_get_buf(tp, mp->m_ddev_targp,
312 mp->m_quotainfo->qi_dqchunklen,
315 error = xfs_buf_geterror(bp);
377 int nmaps = 1,
error;
383 xfs_trans_t *tp = (tpp ? *tpp :
NULL);
413 dqp->
q_bufoffset = (
id % mp->m_quotainfo->qi_dqperchunk) *
431 trace_xfs_dqtobp_read(dqp);
439 error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp,
441 mp->m_quotainfo->qi_dqchunklen,
482 struct xfs_mount *
mp,
491 struct xfs_trans *tp =
NULL;
501 INIT_LIST_HEAD(&dqp->
q_lru);
510 init_completion(&dqp->
q_flush);
522 trace_xfs_dqread(dqp);
532 BBTOB(mp->m_quotainfo->qi_dqchunklen) - 1 + 128,
552 trace_xfs_dqread_fail(dqp);
635 if (xfs_do_dqerror) {
636 if ((xfs_dqerror_target == mp->m_ddev_targp) &&
637 (xfs_dqreq_num++ % xfs_dqerror_mod) == 0) {
638 xfs_debug(mp,
"Returning error in dqget");
647 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
660 trace_xfs_dqget_freeing(dqp);
668 trace_xfs_dqget_hit(dqp);
699 if (xfs_this_quota_on(mp, type)) {
702 dqp1 = xfs_inode_dquot(ip, type);
726 trace_xfs_dqget_dup(dqp);
742 ASSERT((ip ==
NULL) || xfs_isilocked(ip, XFS_ILOCK_EXCL));
743 trace_xfs_dqget_miss(dqp);
756 trace_xfs_dqput_free(dqp);
759 if (list_empty(&dqp->
q_lru)) {
798 trace_xfs_dqput(dqp);
817 trace_xfs_dqrele(dqp);
839 struct xfs_log_item *
lip)
843 struct xfs_ail *ailp = lip->li_ailp;
853 if ((lip->li_flags & XFS_LI_IN_AIL) &&
859 xfs_trans_ail_delete(ailp, lip, SHUTDOWN_CORRUPT_INCORE);
891 trace_xfs_dqflush(dqp);
905 if (XFS_FORCED_SHUTDOWN(mp)) {
909 spin_lock(&mp->m_ail->xa_lock);
910 if (lip->li_flags & XFS_LI_IN_AIL)
911 xfs_trans_ail_delete(mp->m_ail, lip,
912 SHUTDOWN_CORRUPT_INCORE);
914 spin_unlock(&mp->m_ail->xa_lock);
922 error = xfs_trans_read_buf(mp,
NULL, mp->m_ddev_targp, dqp->
q_blkno,
923 mp->m_quotainfo->qi_dqchunklen, 0, &bp);
940 xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
966 if (xfs_buf_ispinned(bp)) {
967 trace_xfs_dqflush_force(dqp);
971 trace_xfs_dqflush_done(dqp);
1012 kmem_zone_init(
sizeof(
struct xfs_dquot),
"xfs_dquot");
1019 goto out_free_dqzone;
1024 kmem_zone_destroy(xfs_qm_dqzone);
1033 kmem_zone_destroy(xfs_qm_dqzone);