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()
229 struct xfs_mount *mp, in xfs_setqlim_limits() argument
238 xfs_debug(mp, "%shard %lld < %ssoft %lld", tag, hard, tag, in xfs_setqlim_limits()
266 struct xfs_mount *mp, in xfs_setqlim_timer() argument
277 res->timer = xfs_dquot_set_timeout(mp, timer); in xfs_setqlim_timer()
286 struct xfs_mount *mp, in xfs_qm_scall_setqlim() argument
291 struct xfs_quotainfo *q = mp->m_quotainfo; in xfs_qm_scall_setqlim()
319 error = xfs_qm_dqget(mp, id, type, true, &dqp); in xfs_qm_scall_setqlim()
328 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_qm_setqlim, 0, 0, 0, &tp); in xfs_qm_scall_setqlim()
354 (xfs_qcnt_t) XFS_B_TO_FSB(mp, newlim->d_spc_hardlimit) : in xfs_qm_scall_setqlim()
357 (xfs_qcnt_t) XFS_B_TO_FSB(mp, newlim->d_spc_softlimit) : in xfs_qm_scall_setqlim()
362 if (xfs_setqlim_limits(mp, res, qlim, hard, soft, "blk")) in xfs_qm_scall_setqlim()
367 xfs_setqlim_timer(mp, res, qlim, newlim->d_spc_timer); in xfs_qm_scall_setqlim()
371 (xfs_qcnt_t) XFS_B_TO_FSB(mp, newlim->d_rt_spc_hardlimit) : in xfs_qm_scall_setqlim()
374 (xfs_qcnt_t) XFS_B_TO_FSB(mp, newlim->d_rt_spc_softlimit) : in xfs_qm_scall_setqlim()
379 xfs_setqlim_limits(mp, res, qlim, hard, soft, "rtb"); in xfs_qm_scall_setqlim()
383 xfs_setqlim_timer(mp, res, qlim, newlim->d_rt_spc_timer); in xfs_qm_scall_setqlim()
395 xfs_setqlim_limits(mp, res, qlim, hard, soft, "ino"); in xfs_qm_scall_setqlim()
399 xfs_setqlim_timer(mp, res, qlim, newlim->d_ino_timer); in xfs_qm_scall_setqlim()
426 struct xfs_mount *mp, in xfs_qm_scall_getquota_fill_qc() argument
432 dst->d_spc_hardlimit = XFS_FSB_TO_B(mp, dqp->q_blk.hardlimit); in xfs_qm_scall_getquota_fill_qc()
433 dst->d_spc_softlimit = XFS_FSB_TO_B(mp, dqp->q_blk.softlimit); in xfs_qm_scall_getquota_fill_qc()
436 dst->d_space = XFS_FSB_TO_B(mp, dqp->q_blk.reserved); in xfs_qm_scall_getquota_fill_qc()
442 dst->d_rt_spc_hardlimit = XFS_FSB_TO_B(mp, dqp->q_rtb.hardlimit); in xfs_qm_scall_getquota_fill_qc()
443 dst->d_rt_spc_softlimit = XFS_FSB_TO_B(mp, dqp->q_rtb.softlimit); in xfs_qm_scall_getquota_fill_qc()
444 dst->d_rt_space = XFS_FSB_TO_B(mp, dqp->q_rtb.reserved); in xfs_qm_scall_getquota_fill_qc()
476 struct xfs_mount *mp, in xfs_qm_scall_getquota() argument
486 xfs_inodegc_flush(mp); in xfs_qm_scall_getquota()
492 error = xfs_qm_dqget(mp, id, type, false, &dqp); in xfs_qm_scall_getquota()
505 xfs_qm_scall_getquota_fill_qc(mp, type, dqp, dst); in xfs_qm_scall_getquota()
518 struct xfs_mount *mp, in xfs_qm_scall_getquota_next() argument
528 xfs_inodegc_flush(mp); in xfs_qm_scall_getquota_next()
530 error = xfs_qm_dqget_next(mp, *id, type, &dqp); in xfs_qm_scall_getquota_next()
537 xfs_qm_scall_getquota_fill_qc(mp, type, dqp, dst); in xfs_qm_scall_getquota_next()