Lines Matching refs:mp

40 STATIC int	xfs_qm_init_quotainos(struct xfs_mount *mp);
41 STATIC int xfs_qm_init_quotainfo(struct xfs_mount *mp);
55 struct xfs_mount *mp, in xfs_qm_dquot_walk() argument
60 struct xfs_quotainfo *qi = mp->m_quotainfo; in xfs_qm_dquot_walk()
206 struct xfs_mount *mp) in xfs_qm_dqpurge_all() argument
208 xfs_qm_dquot_walk(mp, XFS_DQTYPE_USER, xfs_qm_dqpurge, NULL); in xfs_qm_dqpurge_all()
209 xfs_qm_dquot_walk(mp, XFS_DQTYPE_GROUP, xfs_qm_dqpurge, NULL); in xfs_qm_dqpurge_all()
210 xfs_qm_dquot_walk(mp, XFS_DQTYPE_PROJ, xfs_qm_dqpurge, NULL); in xfs_qm_dqpurge_all()
218 struct xfs_mount *mp) in xfs_qm_unmount() argument
220 if (mp->m_quotainfo) { in xfs_qm_unmount()
221 xfs_qm_dqpurge_all(mp); in xfs_qm_unmount()
222 xfs_qm_destroy_quotainfo(mp); in xfs_qm_unmount()
228 struct xfs_mount *mp) in xfs_qm_unmount_rt() argument
230 struct xfs_rtgroup *rtg = xfs_rtgroup_grab(mp, 0); in xfs_qm_unmount_rt()
268 xfs_mount_t *mp) in xfs_qm_unmount_quotas() argument
274 ASSERT(mp->m_rootip); in xfs_qm_unmount_quotas()
275 xfs_qm_dqdetach(mp->m_rootip); in xfs_qm_unmount_quotas()
281 if (!xfs_has_rtgroups(mp)) in xfs_qm_unmount_quotas()
282 xfs_qm_unmount_rt(mp); in xfs_qm_unmount_quotas()
287 if (mp->m_quotainfo) in xfs_qm_unmount_quotas()
288 xfs_qm_destroy_quotainos(mp->m_quotainfo); in xfs_qm_unmount_quotas()
340 struct xfs_mount *mp = ip->i_mount; in xfs_qm_need_dqattach() local
342 if (!XFS_IS_QUOTA_ON(mp)) in xfs_qm_need_dqattach()
344 if (!XFS_NOT_DQATTACHED(mp, ip)) in xfs_qm_need_dqattach()
346 if (xfs_is_quota_inode(&mp->m_sb, ip->i_ino)) in xfs_qm_need_dqattach()
365 xfs_mount_t *mp = ip->i_mount; in xfs_qm_dqattach_locked() local
374 if (XFS_IS_UQUOTA_ON(mp) && !ip->i_udquot) { in xfs_qm_dqattach_locked()
382 if (XFS_IS_GQUOTA_ON(mp) && !ip->i_gdquot) { in xfs_qm_dqattach_locked()
390 if (XFS_IS_PQUOTA_ON(mp) && !ip->i_pdquot) { in xfs_qm_dqattach_locked()
585 struct xfs_mount *mp, in xfs_qm_set_defquota() argument
593 error = xfs_qm_dqget_uncached(mp, 0, type, &dqp); in xfs_qm_set_defquota()
615 struct xfs_mount *mp, in xfs_qm_init_timelimits() argument
618 struct xfs_quotainfo *qinf = mp->m_quotainfo; in xfs_qm_init_timelimits()
636 error = xfs_qm_dqget_uncached(mp, 0, type, &dqp); in xfs_qm_init_timelimits()
657 struct xfs_mount *mp, in xfs_qm_load_metadir_qinos() argument
663 tp = xfs_trans_alloc_empty(mp); in xfs_qm_load_metadir_qinos()
673 if (XFS_IS_UQUOTA_ON(mp)) { in xfs_qm_load_metadir_qinos()
680 if (XFS_IS_GQUOTA_ON(mp)) { in xfs_qm_load_metadir_qinos()
687 if (XFS_IS_PQUOTA_ON(mp)) { in xfs_qm_load_metadir_qinos()
703 struct xfs_mount *mp, in xfs_qm_create_metadir_qinos() argument
709 error = xfs_dqinode_mkdir_parent(mp, &qi->qi_dirip); in xfs_qm_create_metadir_qinos()
717 if (XFS_IS_CORRUPT(mp, qi->qi_dirip == NULL)) in xfs_qm_create_metadir_qinos()
721 if (XFS_IS_UQUOTA_ON(mp) && !qi->qi_uquotaip) { in xfs_qm_create_metadir_qinos()
728 if (XFS_IS_GQUOTA_ON(mp) && !qi->qi_gquotaip) { in xfs_qm_create_metadir_qinos()
735 if (XFS_IS_PQUOTA_ON(mp) && !qi->qi_pquotaip) { in xfs_qm_create_metadir_qinos()
751 struct xfs_mount *mp) in xfs_qm_prep_metadir_sb() argument
756 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_sb, 0, 0, 0, &tp); in xfs_qm_prep_metadir_sb()
760 spin_lock(&mp->m_sb_lock); in xfs_qm_prep_metadir_sb()
762 xfs_add_quota(mp); in xfs_qm_prep_metadir_sb()
765 mp->m_sb.sb_qflags = mp->m_qflags & XFS_ALL_QUOTA_ACCT; in xfs_qm_prep_metadir_sb()
767 spin_unlock(&mp->m_sb_lock); in xfs_qm_prep_metadir_sb()
779 struct xfs_mount *mp) in xfs_qm_init_metadir_qinos() argument
781 struct xfs_quotainfo *qi = mp->m_quotainfo; in xfs_qm_init_metadir_qinos()
784 if (!xfs_has_quota(mp)) { in xfs_qm_init_metadir_qinos()
785 error = xfs_qm_prep_metadir_sb(mp); in xfs_qm_init_metadir_qinos()
790 error = xfs_qm_load_metadir_qinos(mp, qi); in xfs_qm_init_metadir_qinos()
794 error = xfs_qm_create_metadir_qinos(mp, qi); in xfs_qm_init_metadir_qinos()
805 xfs_qm_destroy_quotainos(mp->m_quotainfo); in xfs_qm_init_metadir_qinos()
815 struct xfs_mount *mp) in xfs_qm_init_quotainfo() argument
820 ASSERT(XFS_IS_QUOTA_ON(mp)); in xfs_qm_init_quotainfo()
822 qinf = mp->m_quotainfo = kzalloc(sizeof(struct xfs_quotainfo), in xfs_qm_init_quotainfo()
833 if (xfs_has_metadir(mp)) in xfs_qm_init_quotainfo()
834 error = xfs_qm_init_metadir_qinos(mp); in xfs_qm_init_quotainfo()
836 error = xfs_qm_init_quotainos(mp); in xfs_qm_init_quotainfo()
849 qinf->qi_dqchunklen = XFS_FSB_TO_BB(mp, XFS_DQUOT_CLUSTER_SIZE_FSB); in xfs_qm_init_quotainfo()
851 if (xfs_has_bigtime(mp)) { in xfs_qm_init_quotainfo()
860 trace_xfs_quota_expiry_range(mp, qinf->qi_expiry_min, in xfs_qm_init_quotainfo()
863 mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_CHKD); in xfs_qm_init_quotainfo()
865 xfs_qm_init_timelimits(mp, XFS_DQTYPE_USER); in xfs_qm_init_quotainfo()
866 xfs_qm_init_timelimits(mp, XFS_DQTYPE_GROUP); in xfs_qm_init_quotainfo()
867 xfs_qm_init_timelimits(mp, XFS_DQTYPE_PROJ); in xfs_qm_init_quotainfo()
869 if (XFS_IS_UQUOTA_ON(mp)) in xfs_qm_init_quotainfo()
870 xfs_qm_set_defquota(mp, XFS_DQTYPE_USER, qinf); in xfs_qm_init_quotainfo()
871 if (XFS_IS_GQUOTA_ON(mp)) in xfs_qm_init_quotainfo()
872 xfs_qm_set_defquota(mp, XFS_DQTYPE_GROUP, qinf); in xfs_qm_init_quotainfo()
873 if (XFS_IS_PQUOTA_ON(mp)) in xfs_qm_init_quotainfo()
874 xfs_qm_set_defquota(mp, XFS_DQTYPE_PROJ, qinf); in xfs_qm_init_quotainfo()
877 mp->m_super->s_id); in xfs_qm_init_quotainfo()
902 mp->m_quotainfo = NULL; in xfs_qm_init_quotainfo()
913 struct xfs_mount *mp) in xfs_qm_destroy_quotainfo() argument
917 qi = mp->m_quotainfo; in xfs_qm_destroy_quotainfo()
926 mp->m_quotainfo = NULL; in xfs_qm_destroy_quotainfo()
946 struct xfs_mount *mp, in xfs_qm_qino_alloc() argument
963 if (!xfs_has_pquotino(mp) && in xfs_qm_qino_alloc()
968 (mp->m_sb.sb_gquotino != NULLFSINO)) { in xfs_qm_qino_alloc()
969 ino = mp->m_sb.sb_gquotino; in xfs_qm_qino_alloc()
970 if (XFS_IS_CORRUPT(mp, in xfs_qm_qino_alloc()
971 mp->m_sb.sb_pquotino != NULLFSINO)) { in xfs_qm_qino_alloc()
972 xfs_fs_mark_sick(mp, XFS_SICK_FS_PQUOTA); in xfs_qm_qino_alloc()
976 (mp->m_sb.sb_pquotino != NULLFSINO)) { in xfs_qm_qino_alloc()
977 ino = mp->m_sb.sb_pquotino; in xfs_qm_qino_alloc()
978 if (XFS_IS_CORRUPT(mp, in xfs_qm_qino_alloc()
979 mp->m_sb.sb_gquotino != NULLFSINO)) { in xfs_qm_qino_alloc()
980 xfs_fs_mark_sick(mp, XFS_SICK_FS_GQUOTA); in xfs_qm_qino_alloc()
985 error = xfs_metafile_iget(mp, ino, metafile_type, ipp); in xfs_qm_qino_alloc()
989 mp->m_sb.sb_gquotino = NULLFSINO; in xfs_qm_qino_alloc()
990 mp->m_sb.sb_pquotino = NULLFSINO; in xfs_qm_qino_alloc()
995 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_create, in xfs_qm_qino_alloc()
996 need_alloc ? XFS_QM_QINOCREATE_SPACE_RES(mp) : 0, in xfs_qm_qino_alloc()
1015 if (xfs_has_metadir(mp)) in xfs_qm_qino_alloc()
1024 spin_lock(&mp->m_sb_lock); in xfs_qm_qino_alloc()
1026 ASSERT(!xfs_has_quota(mp)); in xfs_qm_qino_alloc()
1028 xfs_add_quota(mp); in xfs_qm_qino_alloc()
1029 mp->m_sb.sb_uquotino = NULLFSINO; in xfs_qm_qino_alloc()
1030 mp->m_sb.sb_gquotino = NULLFSINO; in xfs_qm_qino_alloc()
1031 mp->m_sb.sb_pquotino = NULLFSINO; in xfs_qm_qino_alloc()
1034 mp->m_sb.sb_qflags = mp->m_qflags & XFS_ALL_QUOTA_ACCT; in xfs_qm_qino_alloc()
1037 mp->m_sb.sb_uquotino = (*ipp)->i_ino; in xfs_qm_qino_alloc()
1039 mp->m_sb.sb_gquotino = (*ipp)->i_ino; in xfs_qm_qino_alloc()
1041 mp->m_sb.sb_pquotino = (*ipp)->i_ino; in xfs_qm_qino_alloc()
1042 spin_unlock(&mp->m_sb_lock); in xfs_qm_qino_alloc()
1047 ASSERT(xfs_is_shutdown(mp)); in xfs_qm_qino_alloc()
1048 xfs_alert(mp, "%s failed (error %d)!", __func__, error); in xfs_qm_qino_alloc()
1060 struct xfs_mount *mp, in xfs_qm_reset_dqcounts() argument
1075 j = (int)XFS_FSB_TO_B(mp, XFS_DQUOT_CLUSTER_SIZE_FSB) / in xfs_qm_reset_dqcounts()
1077 ASSERT(mp->m_quotainfo->qi_dqperchunk == j); in xfs_qm_reset_dqcounts()
1080 for (j = 0; j < mp->m_quotainfo->qi_dqperchunk; j++) { in xfs_qm_reset_dqcounts()
1091 if (xfs_dqblk_verify(mp, &dqb[j], id + j) || in xfs_qm_reset_dqcounts()
1093 xfs_dqblk_repair(mp, &dqb[j], id + j, type); in xfs_qm_reset_dqcounts()
1116 if (xfs_has_bigtime(mp)) in xfs_qm_reset_dqcounts()
1120 if (xfs_has_crc(mp)) { in xfs_qm_reset_dqcounts()
1130 struct xfs_mount *mp, in xfs_qm_reset_dqcounts_all() argument
1152 error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp, in xfs_qm_reset_dqcounts_all()
1153 XFS_FSB_TO_DADDR(mp, bno), in xfs_qm_reset_dqcounts_all()
1154 mp->m_quotainfo->qi_dqchunklen, 0, &bp, in xfs_qm_reset_dqcounts_all()
1165 error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp, in xfs_qm_reset_dqcounts_all()
1166 XFS_FSB_TO_DADDR(mp, bno), in xfs_qm_reset_dqcounts_all()
1167 mp->m_quotainfo->qi_dqchunklen, 0, &bp, in xfs_qm_reset_dqcounts_all()
1180 xfs_qm_reset_dqcounts(mp, bp, firstid, type); in xfs_qm_reset_dqcounts_all()
1186 firstid += mp->m_quotainfo->qi_dqperchunk; in xfs_qm_reset_dqcounts_all()
1198 struct xfs_mount *mp, in xfs_qm_reset_dqcounts_buf() argument
1225 maxlblkcnt = XFS_B_TO_FSB(mp, mp->m_super->s_maxbytes); in xfs_qm_reset_dqcounts_buf()
1254 mp->m_quotainfo->qi_dqperchunk; in xfs_qm_reset_dqcounts_buf()
1263 xfs_buf_readahead(mp->m_ddev_targp, in xfs_qm_reset_dqcounts_buf()
1264 XFS_FSB_TO_DADDR(mp, rablkno), in xfs_qm_reset_dqcounts_buf()
1265 mp->m_quotainfo->qi_dqchunklen, in xfs_qm_reset_dqcounts_buf()
1274 error = xfs_qm_reset_dqcounts_all(mp, firstid, in xfs_qm_reset_dqcounts_buf()
1303 struct xfs_mount *mp = ip->i_mount; in xfs_qm_quotacheck_dqadjust() local
1309 error = xfs_qm_dqget(mp, id, type, true, &dqp); in xfs_qm_quotacheck_dqadjust()
1362 struct xfs_mount *mp, in xfs_qm_dqusage_adjust() argument
1372 ASSERT(XFS_IS_QUOTA_ON(mp)); in xfs_qm_dqusage_adjust()
1378 if (xfs_is_quota_inode(&mp->m_sb, ino)) in xfs_qm_dqusage_adjust()
1385 error = xfs_iget(mp, tp, ino, XFS_IGET_DONTCACHE, 0, &ip); in xfs_qm_dqusage_adjust()
1399 xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); in xfs_qm_dqusage_adjust()
1434 if (XFS_IS_UQUOTA_ON(mp)) { in xfs_qm_dqusage_adjust()
1441 if (XFS_IS_GQUOTA_ON(mp)) { in xfs_qm_dqusage_adjust()
1448 if (XFS_IS_PQUOTA_ON(mp)) { in xfs_qm_dqusage_adjust()
1501 xfs_mount_t *mp) in xfs_qm_quotacheck() argument
1506 struct xfs_inode *uip = mp->m_quotainfo->qi_uquotaip; in xfs_qm_quotacheck()
1507 struct xfs_inode *gip = mp->m_quotainfo->qi_gquotaip; in xfs_qm_quotacheck()
1508 struct xfs_inode *pip = mp->m_quotainfo->qi_pquotaip; in xfs_qm_quotacheck()
1513 ASSERT(XFS_IS_QUOTA_ON(mp)); in xfs_qm_quotacheck()
1515 xfs_notice(mp, "Quotacheck needed: Please wait."); in xfs_qm_quotacheck()
1523 error = xfs_qm_reset_dqcounts_buf(mp, uip, XFS_DQTYPE_USER, in xfs_qm_quotacheck()
1531 error = xfs_qm_reset_dqcounts_buf(mp, gip, XFS_DQTYPE_GROUP, in xfs_qm_quotacheck()
1539 error = xfs_qm_reset_dqcounts_buf(mp, pip, XFS_DQTYPE_PROJ, in xfs_qm_quotacheck()
1546 xfs_set_quotacheck_running(mp); in xfs_qm_quotacheck()
1547 error = xfs_iwalk_threaded(mp, 0, 0, xfs_qm_dqusage_adjust, 0, true, in xfs_qm_quotacheck()
1549 xfs_clear_quotacheck_running(mp); in xfs_qm_quotacheck()
1563 if (XFS_IS_UQUOTA_ON(mp)) { in xfs_qm_quotacheck()
1564 error = xfs_qm_dquot_walk(mp, XFS_DQTYPE_USER, xfs_qm_flush_one, in xfs_qm_quotacheck()
1567 if (XFS_IS_GQUOTA_ON(mp)) { in xfs_qm_quotacheck()
1568 error2 = xfs_qm_dquot_walk(mp, XFS_DQTYPE_GROUP, xfs_qm_flush_one, in xfs_qm_quotacheck()
1573 if (XFS_IS_PQUOTA_ON(mp)) { in xfs_qm_quotacheck()
1574 error2 = xfs_qm_dquot_walk(mp, XFS_DQTYPE_PROJ, xfs_qm_flush_one, in xfs_qm_quotacheck()
1599 mp->m_qflags &= ~XFS_ALL_QUOTA_CHKD; in xfs_qm_quotacheck()
1600 mp->m_qflags |= flags; in xfs_qm_quotacheck()
1606 xfs_warn(mp, in xfs_qm_quotacheck()
1612 ASSERT(mp->m_quotainfo != NULL); in xfs_qm_quotacheck()
1613 xfs_qm_destroy_quotainfo(mp); in xfs_qm_quotacheck()
1614 if (xfs_mount_reset_sbqflags(mp)) { in xfs_qm_quotacheck()
1615 xfs_warn(mp, in xfs_qm_quotacheck()
1618 xfs_fs_mark_sick(mp, XFS_SICK_FS_QUOTACHECK); in xfs_qm_quotacheck()
1620 xfs_notice(mp, "Quotacheck: Done."); in xfs_qm_quotacheck()
1621 xfs_fs_mark_healthy(mp, XFS_SICK_FS_QUOTACHECK); in xfs_qm_quotacheck()
1636 xfs_inodegc_flush(mp); in xfs_qm_quotacheck()
1637 xfs_qm_dqpurge_all(mp); in xfs_qm_quotacheck()
1653 struct xfs_mount *mp) in xfs_qm_mount_quotas() argument
1663 if (mp->m_sb.sb_rextents && in xfs_qm_mount_quotas()
1664 (!xfs_has_rtgroups(mp) || xfs_has_zoned(mp))) { in xfs_qm_mount_quotas()
1665 xfs_notice(mp, "Cannot turn on quotas for realtime filesystem"); in xfs_qm_mount_quotas()
1666 mp->m_qflags = 0; in xfs_qm_mount_quotas()
1670 ASSERT(XFS_IS_QUOTA_ON(mp)); in xfs_qm_mount_quotas()
1676 error = xfs_qm_init_quotainfo(mp); in xfs_qm_mount_quotas()
1681 ASSERT(mp->m_quotainfo == NULL); in xfs_qm_mount_quotas()
1682 mp->m_qflags = 0; in xfs_qm_mount_quotas()
1688 if (XFS_QM_NEED_QUOTACHECK(mp)) { in xfs_qm_mount_quotas()
1689 error = xfs_qm_quotacheck(mp); in xfs_qm_mount_quotas()
1700 if (!XFS_IS_UQUOTA_ON(mp)) in xfs_qm_mount_quotas()
1701 mp->m_qflags &= ~XFS_UQUOTA_CHKD; in xfs_qm_mount_quotas()
1702 if (!XFS_IS_GQUOTA_ON(mp)) in xfs_qm_mount_quotas()
1703 mp->m_qflags &= ~XFS_GQUOTA_CHKD; in xfs_qm_mount_quotas()
1704 if (!XFS_IS_PQUOTA_ON(mp)) in xfs_qm_mount_quotas()
1705 mp->m_qflags &= ~XFS_PQUOTA_CHKD; in xfs_qm_mount_quotas()
1712 spin_lock(&mp->m_sb_lock); in xfs_qm_mount_quotas()
1713 sbf = mp->m_sb.sb_qflags; in xfs_qm_mount_quotas()
1714 mp->m_sb.sb_qflags = mp->m_qflags & XFS_MOUNT_QUOTA_ALL; in xfs_qm_mount_quotas()
1715 spin_unlock(&mp->m_sb_lock); in xfs_qm_mount_quotas()
1717 if (sbf != (mp->m_qflags & XFS_MOUNT_QUOTA_ALL)) { in xfs_qm_mount_quotas()
1718 if (xfs_sync_sb(mp, false)) { in xfs_qm_mount_quotas()
1725 ASSERT(!(XFS_IS_QUOTA_ON(mp))); in xfs_qm_mount_quotas()
1726 xfs_alert(mp, "%s: Superblock update failed!", in xfs_qm_mount_quotas()
1732 xfs_warn(mp, "Failed to initialize disk quotas, err %d.", error); in xfs_qm_mount_quotas()
1747 struct xfs_mount *mp, in xfs_qm_qino_load() argument
1755 tp = xfs_trans_alloc_empty(mp); in xfs_qm_qino_load()
1756 if (xfs_has_metadir(mp)) { in xfs_qm_qino_load()
1776 xfs_mount_t *mp) in xfs_qm_init_quotainos() argument
1784 ASSERT(mp->m_quotainfo); in xfs_qm_init_quotainos()
1789 if (xfs_has_quota(mp)) { in xfs_qm_init_quotainos()
1790 if (XFS_IS_UQUOTA_ON(mp) && in xfs_qm_init_quotainos()
1791 mp->m_sb.sb_uquotino != NULLFSINO) { in xfs_qm_init_quotainos()
1792 ASSERT(mp->m_sb.sb_uquotino > 0); in xfs_qm_init_quotainos()
1793 error = xfs_qm_qino_load(mp, XFS_DQTYPE_USER, &uip); in xfs_qm_init_quotainos()
1797 if (XFS_IS_GQUOTA_ON(mp) && in xfs_qm_init_quotainos()
1798 mp->m_sb.sb_gquotino != NULLFSINO) { in xfs_qm_init_quotainos()
1799 ASSERT(mp->m_sb.sb_gquotino > 0); in xfs_qm_init_quotainos()
1800 error = xfs_qm_qino_load(mp, XFS_DQTYPE_GROUP, &gip); in xfs_qm_init_quotainos()
1804 if (XFS_IS_PQUOTA_ON(mp) && in xfs_qm_init_quotainos()
1805 mp->m_sb.sb_pquotino != NULLFSINO) { in xfs_qm_init_quotainos()
1806 ASSERT(mp->m_sb.sb_pquotino > 0); in xfs_qm_init_quotainos()
1807 error = xfs_qm_qino_load(mp, XFS_DQTYPE_PROJ, &pip); in xfs_qm_init_quotainos()
1821 if (XFS_IS_UQUOTA_ON(mp) && uip == NULL) { in xfs_qm_init_quotainos()
1822 error = xfs_qm_qino_alloc(mp, &uip, in xfs_qm_init_quotainos()
1829 if (XFS_IS_GQUOTA_ON(mp) && gip == NULL) { in xfs_qm_init_quotainos()
1830 error = xfs_qm_qino_alloc(mp, &gip, in xfs_qm_init_quotainos()
1837 if (XFS_IS_PQUOTA_ON(mp) && pip == NULL) { in xfs_qm_init_quotainos()
1838 error = xfs_qm_qino_alloc(mp, &pip, in xfs_qm_init_quotainos()
1844 mp->m_quotainfo->qi_uquotaip = uip; in xfs_qm_init_quotainos()
1845 mp->m_quotainfo->qi_gquotaip = gip; in xfs_qm_init_quotainos()
1846 mp->m_quotainfo->qi_pquotaip = pip; in xfs_qm_init_quotainos()
1864 struct xfs_mount *mp = dqp->q_mount; in xfs_qm_dqfree_one() local
1865 struct xfs_quotainfo *qi = mp->m_quotainfo; in xfs_qm_dqfree_one()
1900 struct xfs_mount *mp = ip->i_mount; in xfs_qm_vop_dqalloc() local
1909 if (!XFS_IS_QUOTA_ON(mp)) in xfs_qm_vop_dqalloc()
1924 if (XFS_NOT_DQATTACHED(mp, ip)) { in xfs_qm_vop_dqalloc()
1932 if ((flags & XFS_QMOPT_UQUOTA) && XFS_IS_UQUOTA_ON(mp)) { in xfs_qm_vop_dqalloc()
1945 error = xfs_qm_dqget(mp, from_kuid(user_ns, uid), in xfs_qm_vop_dqalloc()
1966 if ((flags & XFS_QMOPT_GQUOTA) && XFS_IS_GQUOTA_ON(mp)) { in xfs_qm_vop_dqalloc()
1970 error = xfs_qm_dqget(mp, from_kgid(user_ns, gid), in xfs_qm_vop_dqalloc()
1984 if ((flags & XFS_QMOPT_PQUOTA) && XFS_IS_PQUOTA_ON(mp)) { in xfs_qm_vop_dqalloc()
1988 error = xfs_qm_dqget(mp, prid, in xfs_qm_vop_dqalloc()
2104 struct xfs_mount *mp = i_tab[0]->i_mount; in xfs_qm_vop_rename_dqattach() local
2107 if (!XFS_IS_QUOTA_ON(mp)) in xfs_qm_vop_rename_dqattach()
2118 if (XFS_NOT_DQATTACHED(mp, ip)) { in xfs_qm_vop_rename_dqattach()
2136 struct xfs_mount *mp = tp->t_mountp; in xfs_qm_vop_create_dqattach() local
2138 if (!XFS_IS_QUOTA_ON(mp)) in xfs_qm_vop_create_dqattach()
2144 if (udqp && XFS_IS_UQUOTA_ON(mp)) { in xfs_qm_vop_create_dqattach()
2150 if (gdqp && XFS_IS_GQUOTA_ON(mp)) { in xfs_qm_vop_create_dqattach()
2156 if (pdqp && XFS_IS_PQUOTA_ON(mp)) { in xfs_qm_vop_create_dqattach()