Lines Matching refs:mp
24 xfs_mount_t *mp, in xfs_qm_scall_quotaoff() argument
32 if ((mp->m_qflags & flags) == 0) in xfs_qm_scall_quotaoff()
40 xfs_info(mp, "disabling of quota accounting not supported."); in xfs_qm_scall_quotaoff()
42 mutex_lock(&mp->m_quotainfo->qi_quotaofflock); in xfs_qm_scall_quotaoff()
43 mp->m_qflags &= ~(flags & XFS_ALL_QUOTA_ENFD); in xfs_qm_scall_quotaoff()
44 spin_lock(&mp->m_sb_lock); in xfs_qm_scall_quotaoff()
45 mp->m_sb.sb_qflags = mp->m_qflags; in xfs_qm_scall_quotaoff()
46 spin_unlock(&mp->m_sb_lock); in xfs_qm_scall_quotaoff()
47 mutex_unlock(&mp->m_quotainfo->qi_quotaofflock); in xfs_qm_scall_quotaoff()
50 return xfs_sync_sb(mp, false); in xfs_qm_scall_quotaoff()
55 struct xfs_mount *mp, in xfs_qm_scall_trunc_qfile() argument
65 error = xfs_iget(mp, NULL, ino, 0, 0, &ip); in xfs_qm_scall_trunc_qfile()
71 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, 0, 0, &tp); in xfs_qm_scall_trunc_qfile()
103 xfs_mount_t *mp, in xfs_qm_scall_trunc_qfiles() argument
108 if (!xfs_has_quota(mp) || flags == 0 || in xfs_qm_scall_trunc_qfiles()
110 xfs_debug(mp, "%s: flags=%x m_qflags=%x", in xfs_qm_scall_trunc_qfiles()
111 __func__, flags, mp->m_qflags); in xfs_qm_scall_trunc_qfiles()
116 error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_uquotino); in xfs_qm_scall_trunc_qfiles()
121 error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_gquotino); in xfs_qm_scall_trunc_qfiles()
126 error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_pquotino); in xfs_qm_scall_trunc_qfiles()
138 xfs_mount_t *mp, in xfs_qm_scall_quotaon() argument
151 xfs_debug(mp, "%s: zero flags, m_qflags=%x", in xfs_qm_scall_quotaon()
152 __func__, mp->m_qflags); in xfs_qm_scall_quotaon()
161 if (((mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon()
163 ((mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon()
165 ((mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon()
167 xfs_debug(mp, in xfs_qm_scall_quotaon()
169 __func__, flags, mp->m_sb.sb_qflags); in xfs_qm_scall_quotaon()
175 if ((mp->m_qflags & flags) == flags) in xfs_qm_scall_quotaon()
182 spin_lock(&mp->m_sb_lock); in xfs_qm_scall_quotaon()
183 qf = mp->m_sb.sb_qflags; in xfs_qm_scall_quotaon()
184 mp->m_sb.sb_qflags = qf | flags; in xfs_qm_scall_quotaon()
185 spin_unlock(&mp->m_sb_lock); in xfs_qm_scall_quotaon()
193 error = xfs_sync_sb(mp, false); in xfs_qm_scall_quotaon()
199 if (((mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT) != in xfs_qm_scall_quotaon()
200 (mp->m_qflags & XFS_UQUOTA_ACCT)) || in xfs_qm_scall_quotaon()
201 ((mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT) != in xfs_qm_scall_quotaon()
202 (mp->m_qflags & XFS_PQUOTA_ACCT)) || in xfs_qm_scall_quotaon()
203 ((mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) != in xfs_qm_scall_quotaon()
204 (mp->m_qflags & XFS_GQUOTA_ACCT))) in xfs_qm_scall_quotaon()
207 if (!XFS_IS_QUOTA_ON(mp)) in xfs_qm_scall_quotaon()
213 mutex_lock(&mp->m_quotainfo->qi_quotaofflock); in xfs_qm_scall_quotaon()
214 mp->m_qflags |= (flags & XFS_ALL_QUOTA_ENFD); in xfs_qm_scall_quotaon()
215 mutex_unlock(&mp->m_quotainfo->qi_quotaofflock); in xfs_qm_scall_quotaon()
228 struct xfs_mount *mp, in xfs_setqlim_limits() argument
237 xfs_debug(mp, "%shard %lld < %ssoft %lld", tag, hard, tag, in xfs_setqlim_limits()
254 struct xfs_mount *mp, in xfs_setqlim_timer() argument
265 res->timer = xfs_dquot_set_timeout(mp, timer); in xfs_setqlim_timer()
274 struct xfs_mount *mp, in xfs_qm_scall_setqlim() argument
279 struct xfs_quotainfo *q = mp->m_quotainfo; in xfs_qm_scall_setqlim()
300 error = xfs_qm_dqget(mp, id, type, true, &dqp); in xfs_qm_scall_setqlim()
309 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_qm_setqlim, 0, 0, 0, &tp); in xfs_qm_scall_setqlim()
335 (xfs_qcnt_t) XFS_B_TO_FSB(mp, newlim->d_spc_hardlimit) : in xfs_qm_scall_setqlim()
338 (xfs_qcnt_t) XFS_B_TO_FSB(mp, newlim->d_spc_softlimit) : in xfs_qm_scall_setqlim()
343 if (xfs_setqlim_limits(mp, res, qlim, hard, soft, "blk")) in xfs_qm_scall_setqlim()
346 xfs_setqlim_timer(mp, res, qlim, newlim->d_spc_timer); in xfs_qm_scall_setqlim()
350 (xfs_qcnt_t) XFS_B_TO_FSB(mp, newlim->d_rt_spc_hardlimit) : in xfs_qm_scall_setqlim()
353 (xfs_qcnt_t) XFS_B_TO_FSB(mp, newlim->d_rt_spc_softlimit) : in xfs_qm_scall_setqlim()
358 xfs_setqlim_limits(mp, res, qlim, hard, soft, "rtb"); in xfs_qm_scall_setqlim()
360 xfs_setqlim_timer(mp, res, qlim, newlim->d_rt_spc_timer); in xfs_qm_scall_setqlim()
372 xfs_setqlim_limits(mp, res, qlim, hard, soft, "ino"); in xfs_qm_scall_setqlim()
374 xfs_setqlim_timer(mp, res, qlim, newlim->d_ino_timer); in xfs_qm_scall_setqlim()
399 struct xfs_mount *mp, in xfs_qm_scall_getquota_fill_qc() argument
405 dst->d_spc_hardlimit = XFS_FSB_TO_B(mp, dqp->q_blk.hardlimit); in xfs_qm_scall_getquota_fill_qc()
406 dst->d_spc_softlimit = XFS_FSB_TO_B(mp, dqp->q_blk.softlimit); in xfs_qm_scall_getquota_fill_qc()
409 dst->d_space = XFS_FSB_TO_B(mp, dqp->q_blk.reserved); in xfs_qm_scall_getquota_fill_qc()
415 dst->d_rt_spc_hardlimit = XFS_FSB_TO_B(mp, dqp->q_rtb.hardlimit); in xfs_qm_scall_getquota_fill_qc()
416 dst->d_rt_spc_softlimit = XFS_FSB_TO_B(mp, dqp->q_rtb.softlimit); in xfs_qm_scall_getquota_fill_qc()
417 dst->d_rt_space = XFS_FSB_TO_B(mp, dqp->q_rtb.reserved); in xfs_qm_scall_getquota_fill_qc()
449 struct xfs_mount *mp, in xfs_qm_scall_getquota() argument
462 xfs_inodegc_push(mp); in xfs_qm_scall_getquota()
468 error = xfs_qm_dqget(mp, id, type, false, &dqp); in xfs_qm_scall_getquota()
481 xfs_qm_scall_getquota_fill_qc(mp, type, dqp, dst); in xfs_qm_scall_getquota()
494 struct xfs_mount *mp, in xfs_qm_scall_getquota_next() argument
504 xfs_inodegc_push(mp); in xfs_qm_scall_getquota_next()
506 error = xfs_qm_dqget_next(mp, *id, type, &dqp); in xfs_qm_scall_getquota_next()
513 xfs_qm_scall_getquota_fill_qc(mp, type, dqp, dst); in xfs_qm_scall_getquota_next()