Lines Matching +full:tie +full:- +full:off
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2003 Silicon Graphics, Inc.
32 * ip->i_lock
33 * qi->qi_tree_lock
34 * dquot->q_qlock (xfs_dqlock() and friends)
35 * dquot->q_flush (xfs_dqflock() and friends)
36 * qi->qi_lru_lock
53 struct xfs_mount *mp = dqp->q_mount; in xfs_dquot_mark_sick()
55 switch (dqp->q_type) { in xfs_dquot_mark_sick()
78 ASSERT(list_empty(&dqp->q_lru)); in xfs_qm_dqdestroy()
80 kvfree(dqp->q_logitem.qli_item.li_lv_shadow); in xfs_qm_dqdestroy()
81 mutex_destroy(&dqp->q_qlock); in xfs_qm_dqdestroy()
83 XFS_STATS_DEC(dqp->q_mount, xs_qm_dquot); in xfs_qm_dqdestroy()
96 struct xfs_mount *mp = dq->q_mount; in xfs_qm_adjust_dqlimits()
97 struct xfs_quotainfo *q = mp->m_quotainfo; in xfs_qm_adjust_dqlimits()
101 ASSERT(dq->q_id); in xfs_qm_adjust_dqlimits()
104 if (!dq->q_blk.softlimit) { in xfs_qm_adjust_dqlimits()
105 dq->q_blk.softlimit = defq->blk.soft; in xfs_qm_adjust_dqlimits()
108 if (!dq->q_blk.hardlimit) { in xfs_qm_adjust_dqlimits()
109 dq->q_blk.hardlimit = defq->blk.hard; in xfs_qm_adjust_dqlimits()
112 if (!dq->q_ino.softlimit) in xfs_qm_adjust_dqlimits()
113 dq->q_ino.softlimit = defq->ino.soft; in xfs_qm_adjust_dqlimits()
114 if (!dq->q_ino.hardlimit) in xfs_qm_adjust_dqlimits()
115 dq->q_ino.hardlimit = defq->ino.hard; in xfs_qm_adjust_dqlimits()
116 if (!dq->q_rtb.softlimit) in xfs_qm_adjust_dqlimits()
117 dq->q_rtb.softlimit = defq->rtb.soft; in xfs_qm_adjust_dqlimits()
118 if (!dq->q_rtb.hardlimit) in xfs_qm_adjust_dqlimits()
119 dq->q_rtb.hardlimit = defq->rtb.hard; in xfs_qm_adjust_dqlimits()
131 struct xfs_quotainfo *qi = mp->m_quotainfo; in xfs_dquot_set_timeout()
133 return clamp_t(time64_t, timeout, qi->qi_expiry_min, in xfs_dquot_set_timeout()
134 qi->qi_expiry_max); in xfs_dquot_set_timeout()
155 ASSERT(res->hardlimit == 0 || res->softlimit <= res->hardlimit); in xfs_qm_adjust_res_timer()
157 if ((res->softlimit && res->count > res->softlimit) || in xfs_qm_adjust_res_timer()
158 (res->hardlimit && res->count > res->hardlimit)) { in xfs_qm_adjust_res_timer()
159 if (res->timer == 0) in xfs_qm_adjust_res_timer()
160 res->timer = xfs_dquot_set_timeout(mp, in xfs_qm_adjust_res_timer()
161 ktime_get_real_seconds() + qlim->time); in xfs_qm_adjust_res_timer()
163 res->timer = 0; in xfs_qm_adjust_res_timer()
170 * This gets called even when quota enforcement is OFF, which makes our
172 * reservations in that case, when enforcement is off).
174 * enforcement's off.
178 * the soft limit (they are only ever set non-zero via userspace).
184 struct xfs_mount *mp = dq->q_mount; in xfs_qm_adjust_dqtimers()
185 struct xfs_quotainfo *qi = mp->m_quotainfo; in xfs_qm_adjust_dqtimers()
188 ASSERT(dq->q_id); in xfs_qm_adjust_dqtimers()
191 xfs_qm_adjust_res_timer(dq->q_mount, &dq->q_blk, &defq->blk); in xfs_qm_adjust_dqtimers()
192 xfs_qm_adjust_res_timer(dq->q_mount, &dq->q_ino, &defq->ino); in xfs_qm_adjust_dqtimers()
193 xfs_qm_adjust_res_timer(dq->q_mount, &dq->q_rtb, &defq->rtb); in xfs_qm_adjust_dqtimers()
206 struct xfs_mount *mp = tp->t_mountp; in xfs_qm_init_dquot_blk()
207 struct xfs_quotainfo *q = mp->m_quotainfo; in xfs_qm_init_dquot_blk()
235 d = bp->b_addr; in xfs_qm_init_dquot_blk()
238 * ID of the first dquot in the block - id's are zero based. in xfs_qm_init_dquot_blk()
240 curid = id - (id % q->qi_dqperchunk); in xfs_qm_init_dquot_blk()
241 memset(d, 0, BBTOB(q->qi_dqchunklen)); in xfs_qm_init_dquot_blk()
242 for (i = 0; i < q->qi_dqperchunk; i++, d++, curid++) { in xfs_qm_init_dquot_blk()
243 d->dd_diskdq.d_magic = cpu_to_be16(XFS_DQUOT_MAGIC); in xfs_qm_init_dquot_blk()
244 d->dd_diskdq.d_version = XFS_DQUOT_VERSION; in xfs_qm_init_dquot_blk()
245 d->dd_diskdq.d_id = cpu_to_be32(curid); in xfs_qm_init_dquot_blk()
246 d->dd_diskdq.d_type = type; in xfs_qm_init_dquot_blk()
248 d->dd_diskdq.d_type |= XFS_DQTYPE_BIGTIME; in xfs_qm_init_dquot_blk()
250 uuid_copy(&d->dd_uuid, &mp->m_sb.sb_meta_uuid); in xfs_qm_init_dquot_blk()
274 if (!(mp->m_qflags & qflag)) in xfs_qm_init_dquot_blk()
277 xfs_trans_log_buf(tp, bp, 0, BBTOB(q->qi_dqchunklen) - 1); in xfs_qm_init_dquot_blk()
290 dqp->q_prealloc_hi_wmark = dqp->q_blk.hardlimit; in xfs_dquot_set_prealloc_limits()
291 dqp->q_prealloc_lo_wmark = dqp->q_blk.softlimit; in xfs_dquot_set_prealloc_limits()
292 if (!dqp->q_prealloc_lo_wmark) { in xfs_dquot_set_prealloc_limits()
293 dqp->q_prealloc_lo_wmark = dqp->q_prealloc_hi_wmark; in xfs_dquot_set_prealloc_limits()
294 do_div(dqp->q_prealloc_lo_wmark, 100); in xfs_dquot_set_prealloc_limits()
295 dqp->q_prealloc_lo_wmark *= 95; in xfs_dquot_set_prealloc_limits()
298 space = dqp->q_prealloc_hi_wmark; in xfs_dquot_set_prealloc_limits()
301 dqp->q_low_space[XFS_QLOWSP_1_PCNT] = space; in xfs_dquot_set_prealloc_limits()
302 dqp->q_low_space[XFS_QLOWSP_3_PCNT] = space * 3; in xfs_dquot_set_prealloc_limits()
303 dqp->q_low_space[XFS_QLOWSP_5_PCNT] = space * 5; in xfs_dquot_set_prealloc_limits()
307 * Ensure that the given in-core dquot has a buffer on disk backing it, and
318 struct xfs_mount *mp = dqp->q_mount; in xfs_dquot_disk_alloc()
327 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_qm_dqalloc, in xfs_dquot_disk_alloc()
335 if (!xfs_this_quota_on(dqp->q_mount, qtype)) { in xfs_dquot_disk_alloc()
337 * Return if this type of quotas is turned off while we didn't in xfs_dquot_disk_alloc()
340 error = -ESRCH; in xfs_dquot_disk_alloc()
350 error = xfs_bmapi_write(tp, quotip, dqp->q_fileoffset, in xfs_dquot_disk_alloc()
363 dqp->q_blkno = XFS_FSB_TO_DADDR(mp, map.br_startblock); in xfs_dquot_disk_alloc()
366 error = xfs_trans_get_buf(tp, mp->m_ddev_targp, dqp->q_blkno, in xfs_dquot_disk_alloc()
367 mp->m_quotainfo->qi_dqchunklen, 0, &bp); in xfs_dquot_disk_alloc()
370 bp->b_ops = &xfs_dquot_buf_ops; in xfs_dquot_disk_alloc()
376 xfs_qm_init_dquot_blk(tp, dqp->q_id, qtype, bp); in xfs_dquot_disk_alloc()
421 * Read in the in-core dquot's on-disk metadata and return the buffer.
441 * Return if this type of quotas is turned off while we in xfs_dquot_disk_read()
445 return -ESRCH; in xfs_dquot_disk_read()
451 error = xfs_bmapi_read(quotip, dqp->q_fileoffset, in xfs_dquot_disk_read()
461 return -ENOENT; in xfs_dquot_disk_read()
469 dqp->q_blkno = XFS_FSB_TO_DADDR(mp, map.br_startblock); in xfs_dquot_disk_read()
471 error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp, dqp->q_blkno, in xfs_dquot_disk_read()
472 mp->m_quotainfo->qi_dqchunklen, 0, &bp, in xfs_dquot_disk_read()
499 dqp->q_type = type; in xfs_dquot_alloc()
500 dqp->q_id = id; in xfs_dquot_alloc()
501 dqp->q_mount = mp; in xfs_dquot_alloc()
502 INIT_LIST_HEAD(&dqp->q_lru); in xfs_dquot_alloc()
503 mutex_init(&dqp->q_qlock); in xfs_dquot_alloc()
504 init_waitqueue_head(&dqp->q_pinwait); in xfs_dquot_alloc()
505 dqp->q_fileoffset = (xfs_fileoff_t)id / mp->m_quotainfo->qi_dqperchunk; in xfs_dquot_alloc()
509 dqp->q_bufoffset = (id % mp->m_quotainfo->qi_dqperchunk) * in xfs_dquot_alloc()
517 init_completion(&dqp->q_flush); in xfs_dquot_alloc()
518 complete(&dqp->q_flush); in xfs_dquot_alloc()
529 lockdep_set_class(&dqp->q_qlock, &xfs_dquot_group_class); in xfs_dquot_alloc()
532 lockdep_set_class(&dqp->q_qlock, &xfs_dquot_project_class); in xfs_dquot_alloc()
554 ddqp_type = ddqp->d_type & XFS_DQTYPE_REC_MASK; in xfs_dquot_check_type()
557 if (be32_to_cpu(ddqp->d_id) != dqp->q_id) in xfs_dquot_check_type()
562 * expect an exact match for user dquots and for non-root group and in xfs_dquot_check_type()
565 if (xfs_has_crc(dqp->q_mount) || in xfs_dquot_check_type()
566 dqp_type == XFS_DQTYPE_USER || dqp->q_id != 0) in xfs_dquot_check_type()
571 * at the same time. The non-user quota file can be switched between in xfs_dquot_check_type()
581 /* Copy the in-core quota fields in from the on-disk buffer. */
587 struct xfs_dqblk *dqb = xfs_buf_offset(bp, dqp->q_bufoffset); in xfs_dquot_from_disk()
588 struct xfs_disk_dquot *ddqp = &dqb->dd_diskdq; in xfs_dquot_from_disk()
595 xfs_alert_tag(bp->b_mount, XFS_PTAG_VERIFIER_ERROR, in xfs_dquot_from_disk()
597 __this_address, dqp->q_id); in xfs_dquot_from_disk()
598 xfs_alert(bp->b_mount, "Unmount and run xfs_repair"); in xfs_dquot_from_disk()
600 return -EFSCORRUPTED; in xfs_dquot_from_disk()
604 dqp->q_type = ddqp->d_type; in xfs_dquot_from_disk()
605 dqp->q_blk.hardlimit = be64_to_cpu(ddqp->d_blk_hardlimit); in xfs_dquot_from_disk()
606 dqp->q_blk.softlimit = be64_to_cpu(ddqp->d_blk_softlimit); in xfs_dquot_from_disk()
607 dqp->q_ino.hardlimit = be64_to_cpu(ddqp->d_ino_hardlimit); in xfs_dquot_from_disk()
608 dqp->q_ino.softlimit = be64_to_cpu(ddqp->d_ino_softlimit); in xfs_dquot_from_disk()
609 dqp->q_rtb.hardlimit = be64_to_cpu(ddqp->d_rtb_hardlimit); in xfs_dquot_from_disk()
610 dqp->q_rtb.softlimit = be64_to_cpu(ddqp->d_rtb_softlimit); in xfs_dquot_from_disk()
612 dqp->q_blk.count = be64_to_cpu(ddqp->d_bcount); in xfs_dquot_from_disk()
613 dqp->q_ino.count = be64_to_cpu(ddqp->d_icount); in xfs_dquot_from_disk()
614 dqp->q_rtb.count = be64_to_cpu(ddqp->d_rtbcount); in xfs_dquot_from_disk()
616 dqp->q_blk.timer = xfs_dquot_from_disk_ts(ddqp, ddqp->d_btimer); in xfs_dquot_from_disk()
617 dqp->q_ino.timer = xfs_dquot_from_disk_ts(ddqp, ddqp->d_itimer); in xfs_dquot_from_disk()
618 dqp->q_rtb.timer = xfs_dquot_from_disk_ts(ddqp, ddqp->d_rtbtimer); in xfs_dquot_from_disk()
624 dqp->q_blk.reserved = dqp->q_blk.count; in xfs_dquot_from_disk()
625 dqp->q_ino.reserved = dqp->q_ino.count; in xfs_dquot_from_disk()
626 dqp->q_rtb.reserved = dqp->q_rtb.count; in xfs_dquot_from_disk()
633 /* Copy the in-core quota fields into the on-disk buffer. */
639 ddqp->d_magic = cpu_to_be16(XFS_DQUOT_MAGIC); in xfs_dquot_to_disk()
640 ddqp->d_version = XFS_DQUOT_VERSION; in xfs_dquot_to_disk()
641 ddqp->d_type = dqp->q_type; in xfs_dquot_to_disk()
642 ddqp->d_id = cpu_to_be32(dqp->q_id); in xfs_dquot_to_disk()
643 ddqp->d_pad0 = 0; in xfs_dquot_to_disk()
644 ddqp->d_pad = 0; in xfs_dquot_to_disk()
646 ddqp->d_blk_hardlimit = cpu_to_be64(dqp->q_blk.hardlimit); in xfs_dquot_to_disk()
647 ddqp->d_blk_softlimit = cpu_to_be64(dqp->q_blk.softlimit); in xfs_dquot_to_disk()
648 ddqp->d_ino_hardlimit = cpu_to_be64(dqp->q_ino.hardlimit); in xfs_dquot_to_disk()
649 ddqp->d_ino_softlimit = cpu_to_be64(dqp->q_ino.softlimit); in xfs_dquot_to_disk()
650 ddqp->d_rtb_hardlimit = cpu_to_be64(dqp->q_rtb.hardlimit); in xfs_dquot_to_disk()
651 ddqp->d_rtb_softlimit = cpu_to_be64(dqp->q_rtb.softlimit); in xfs_dquot_to_disk()
653 ddqp->d_bcount = cpu_to_be64(dqp->q_blk.count); in xfs_dquot_to_disk()
654 ddqp->d_icount = cpu_to_be64(dqp->q_ino.count); in xfs_dquot_to_disk()
655 ddqp->d_rtbcount = cpu_to_be64(dqp->q_rtb.count); in xfs_dquot_to_disk()
657 ddqp->d_bwarns = 0; in xfs_dquot_to_disk()
658 ddqp->d_iwarns = 0; in xfs_dquot_to_disk()
659 ddqp->d_rtbwarns = 0; in xfs_dquot_to_disk()
661 ddqp->d_btimer = xfs_dquot_to_disk_ts(dqp, dqp->q_blk.timer); in xfs_dquot_to_disk()
662 ddqp->d_itimer = xfs_dquot_to_disk_ts(dqp, dqp->q_ino.timer); in xfs_dquot_to_disk()
663 ddqp->d_rtbtimer = xfs_dquot_to_disk_ts(dqp, dqp->q_rtb.timer); in xfs_dquot_to_disk()
669 * holes in the on-disk metadata.
688 if (error == -ENOENT && can_alloc) in xfs_qm_dqread()
696 * has its own locking protocol so we needn't tie up the buffer any in xfs_qm_dqread()
736 return -ENOENT; in xfs_dq_get_next_id()
739 if (next_id % mp->m_quotainfo->qi_dqperchunk) { in xfs_dq_get_next_id()
745 start = (xfs_fsblock_t)next_id / mp->m_quotainfo->qi_dqperchunk; in xfs_dq_get_next_id()
752 if (xfs_iext_lookup_extent(quotip, "ip->i_df, start, &cur, &got)) { in xfs_dq_get_next_id()
756 *id = got.br_startoff * mp->m_quotainfo->qi_dqperchunk; in xfs_dq_get_next_id()
758 error = -ENOENT; in xfs_dq_get_next_id()
767 * Look up the dquot in the in-core cache. If found, the dquot is returned
780 mutex_lock(&qi->qi_tree_lock); in xfs_qm_dqget_cache_lookup()
783 mutex_unlock(&qi->qi_tree_lock); in xfs_qm_dqget_cache_lookup()
789 if (dqp->q_flags & XFS_DQFLAG_FREEING) { in xfs_qm_dqget_cache_lookup()
791 mutex_unlock(&qi->qi_tree_lock); in xfs_qm_dqget_cache_lookup()
797 dqp->q_nrefs++; in xfs_qm_dqget_cache_lookup()
798 mutex_unlock(&qi->qi_tree_lock); in xfs_qm_dqget_cache_lookup()
806 * Try to insert a new dquot into the in-core cache. If an error occurs the
812 * tree can do memory allocation during insert. The qi->qi_tree_lock is taken in
829 mutex_lock(&qi->qi_tree_lock); in xfs_qm_dqget_cache_insert()
839 dqp->q_nrefs = 1; in xfs_qm_dqget_cache_insert()
840 qi->qi_dquots++; in xfs_qm_dqget_cache_insert()
843 mutex_unlock(&qi->qi_tree_lock); in xfs_qm_dqget_cache_insert()
857 return -ESRCH; in xfs_qm_dqget_checks()
861 return -ESRCH; in xfs_qm_dqget_checks()
865 return -ESRCH; in xfs_qm_dqget_checks()
869 return -EINVAL; in xfs_qm_dqget_checks()
885 struct xfs_quotainfo *qi = mp->m_quotainfo; in xfs_qm_dqget()
922 * Given a dquot id and type, read and initialize a dquot from the on-disk
955 return ip->i_projid; in xfs_qm_id_for_quotatype()
973 struct xfs_mount *mp = ip->i_mount; in xfs_qm_dqget_inode()
974 struct xfs_quotainfo *qi = mp->m_quotainfo; in xfs_qm_dqget_inode()
1001 * we re-acquire the lock. in xfs_qm_dqget_inode()
1026 return -ESRCH; in xfs_qm_dqget_inode()
1064 if (error == -ENOENT) in xfs_qm_dqget_next()
1081 * Release a reference to the dquot (decrement ref-count) and unlock it.
1090 ASSERT(dqp->q_nrefs > 0); in xfs_qm_dqput()
1095 if (--dqp->q_nrefs == 0) { in xfs_qm_dqput()
1096 struct xfs_quotainfo *qi = dqp->q_mount->m_quotainfo; in xfs_qm_dqput()
1099 if (list_lru_add_obj(&qi->qi_lru, &dqp->q_lru)) in xfs_qm_dqput()
1100 XFS_STATS_INC(dqp->q_mount, xs_qm_dquot_unused); in xfs_qm_dqput()
1132 * from the AIL if it has not been re-logged, and unlocking the dquot's
1140 struct xfs_dquot *dqp = qip->qli_dquot; in xfs_qm_dqflush_done()
1141 struct xfs_ail *ailp = lip->li_ailp; in xfs_qm_dqflush_done()
1152 if (test_bit(XFS_LI_IN_AIL, &lip->li_flags) && in xfs_qm_dqflush_done()
1153 ((lip->li_lsn == qip->qli_flush_lsn) || in xfs_qm_dqflush_done()
1154 test_bit(XFS_LI_FAILED, &lip->li_flags))) { in xfs_qm_dqflush_done()
1156 spin_lock(&ailp->ail_lock); in xfs_qm_dqflush_done()
1158 if (lip->li_lsn == qip->qli_flush_lsn) { in xfs_qm_dqflush_done()
1163 spin_unlock(&ailp->ail_lock); in xfs_qm_dqflush_done()
1179 list_for_each_entry_safe(lip, n, &bp->b_li_list, li_bio_list) { in xfs_buf_dquot_iodone()
1180 list_del_init(&lip->li_bio_list); in xfs_buf_dquot_iodone()
1191 spin_lock(&bp->b_mount->m_ail->ail_lock); in xfs_buf_dquot_io_fail()
1192 list_for_each_entry(lip, &bp->b_li_list, li_bio_list) in xfs_buf_dquot_io_fail()
1194 spin_unlock(&bp->b_mount->m_ail->ail_lock); in xfs_buf_dquot_io_fail()
1209 if (dqp->q_id == 0) in xfs_qm_dqflush_check()
1212 if (dqp->q_blk.softlimit && dqp->q_blk.count > dqp->q_blk.softlimit && in xfs_qm_dqflush_check()
1213 !dqp->q_blk.timer) in xfs_qm_dqflush_check()
1216 if (dqp->q_ino.softlimit && dqp->q_ino.count > dqp->q_ino.softlimit && in xfs_qm_dqflush_check()
1217 !dqp->q_ino.timer) in xfs_qm_dqflush_check()
1220 if (dqp->q_rtb.softlimit && dqp->q_rtb.count > dqp->q_rtb.softlimit && in xfs_qm_dqflush_check()
1221 !dqp->q_rtb.timer) in xfs_qm_dqflush_check()
1225 if (dqp->q_type & XFS_DQTYPE_BIGTIME) { in xfs_qm_dqflush_check()
1226 if (!xfs_has_bigtime(dqp->q_mount)) in xfs_qm_dqflush_check()
1228 if (dqp->q_id == 0) in xfs_qm_dqflush_check()
1248 struct xfs_mount *mp = dqp->q_mount; in xfs_qm_dqflush()
1249 struct xfs_log_item *lip = &dqp->q_logitem.qli_item; in xfs_qm_dqflush()
1256 ASSERT(!completion_done(&dqp->q_flush)); in xfs_qm_dqflush()
1265 * Get the buffer containing the on-disk dquot in xfs_qm_dqflush()
1267 error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp, dqp->q_blkno, in xfs_qm_dqflush()
1268 mp->m_quotainfo->qi_dqchunklen, XBF_TRYLOCK, in xfs_qm_dqflush()
1270 if (error == -EAGAIN) in xfs_qm_dqflush()
1280 dqp->q_id, fa); in xfs_qm_dqflush()
1283 error = -EFSCORRUPTED; in xfs_qm_dqflush()
1288 dqblk = xfs_buf_offset(bp, dqp->q_bufoffset); in xfs_qm_dqflush()
1289 xfs_dquot_to_disk(&dqblk->dd_diskdq, dqp); in xfs_qm_dqflush()
1294 dqp->q_flags &= ~XFS_DQFLAG_DIRTY; in xfs_qm_dqflush()
1296 xfs_trans_ail_copy_lsn(mp->m_ail, &dqp->q_logitem.qli_flush_lsn, in xfs_qm_dqflush()
1297 &dqp->q_logitem.qli_item.li_lsn); in xfs_qm_dqflush()
1300 * copy the lsn into the on-disk dquot now while we have the in memory in xfs_qm_dqflush()
1304 * We also calculate the CRC here so that the on-disk dquot in the in xfs_qm_dqflush()
1306 * of a dquot without an up-to-date CRC getting to disk. in xfs_qm_dqflush()
1309 dqblk->dd_lsn = cpu_to_be64(dqp->q_logitem.qli_item.li_lsn); in xfs_qm_dqflush()
1318 bp->b_flags |= _XBF_DQUOTS; in xfs_qm_dqflush()
1319 list_add_tail(&dqp->q_logitem.qli_item.li_bio_list, &bp->b_li_list); in xfs_qm_dqflush()
1335 dqp->q_flags &= ~XFS_DQFLAG_DIRTY; in xfs_qm_dqflush()
1356 if (d1->q_id > d2->q_id) { in xfs_dqlock2()
1357 mutex_lock(&d2->q_qlock); in xfs_dqlock2()
1358 mutex_lock_nested(&d1->q_qlock, XFS_QLOCK_NESTED); in xfs_dqlock2()
1360 mutex_lock(&d1->q_qlock); in xfs_dqlock2()
1361 mutex_lock_nested(&d2->q_qlock, XFS_QLOCK_NESTED); in xfs_dqlock2()
1364 mutex_lock(&d1->q_qlock); in xfs_dqlock2()
1366 mutex_lock(&d2->q_qlock); in xfs_dqlock2()
1378 if (qa->qt_dquot->q_id > qb->qt_dquot->q_id) in xfs_dqtrx_cmp()
1380 if (qa->qt_dquot->q_id < qb->qt_dquot->q_id) in xfs_dqtrx_cmp()
1381 return -1; in xfs_dqtrx_cmp()
1405 mutex_lock(&q[0].qt_dquot->q_qlock); in xfs_dqlockn()
1407 mutex_lock_nested(&q[i].qt_dquot->q_qlock, in xfs_dqlockn()
1408 XFS_QLOCK_NESTED + i - 1); in xfs_dqlockn()
1431 return -ENOMEM; in xfs_qm_init()