Lines Matching full: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
62 error = xfs_qm_qino_load(mp, type, &ip); in xfs_qm_scall_trunc_qfile()
70 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, 0, 0, &tp); in xfs_qm_scall_trunc_qfile()
102 xfs_mount_t *mp, in xfs_qm_scall_trunc_qfiles() argument
107 if (!xfs_has_quota(mp) || flags == 0 || in xfs_qm_scall_trunc_qfiles()
109 xfs_debug(mp, "%s: flags=%x m_qflags=%x", in xfs_qm_scall_trunc_qfiles()
110 __func__, flags, mp->m_qflags); in xfs_qm_scall_trunc_qfiles()
115 error = xfs_qm_scall_trunc_qfile(mp, XFS_DQTYPE_USER); in xfs_qm_scall_trunc_qfiles()
120 error = xfs_qm_scall_trunc_qfile(mp, XFS_DQTYPE_GROUP); in xfs_qm_scall_trunc_qfiles()
125 error = xfs_qm_scall_trunc_qfile(mp, XFS_DQTYPE_PROJ); in xfs_qm_scall_trunc_qfiles()
137 xfs_mount_t *mp, in xfs_qm_scall_quotaon() argument
150 xfs_debug(mp, "%s: zero flags, m_qflags=%x", in xfs_qm_scall_quotaon()
151 __func__, mp->m_qflags); in xfs_qm_scall_quotaon()
160 if (((mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon()
162 ((mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon()
164 ((mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon()
166 xfs_debug(mp, in xfs_qm_scall_quotaon()
168 __func__, flags, mp->m_sb.sb_qflags); in xfs_qm_scall_quotaon()
174 if ((mp->m_qflags & flags) == flags) in xfs_qm_scall_quotaon()
178 * Change sb_qflags on disk but not incore mp->qflags in xfs_qm_scall_quotaon()
181 spin_lock(&mp->m_sb_lock); in xfs_qm_scall_quotaon()
182 qf = mp->m_sb.sb_qflags; in xfs_qm_scall_quotaon()
183 mp->m_sb.sb_qflags = qf | flags; in xfs_qm_scall_quotaon()
184 spin_unlock(&mp->m_sb_lock); in xfs_qm_scall_quotaon()
192 error = xfs_sync_sb(mp, false); in xfs_qm_scall_quotaon()
198 if (((mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT) != in xfs_qm_scall_quotaon()
199 (mp->m_qflags & XFS_UQUOTA_ACCT)) || in xfs_qm_scall_quotaon()
200 ((mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT) != in xfs_qm_scall_quotaon()
201 (mp->m_qflags & XFS_PQUOTA_ACCT)) || in xfs_qm_scall_quotaon()
202 ((mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) != in xfs_qm_scall_quotaon()
203 (mp->m_qflags & XFS_GQUOTA_ACCT))) in xfs_qm_scall_quotaon()
206 if (!XFS_IS_QUOTA_ON(mp)) in xfs_qm_scall_quotaon()
212 mutex_lock(&mp->m_quotainfo->qi_quotaofflock); in xfs_qm_scall_quotaon()
213 mp->m_qflags |= (flags & XFS_ALL_QUOTA_ENFD); in xfs_qm_scall_quotaon()
214 mutex_unlock(&mp->m_quotainfo->qi_quotaofflock); in xfs_qm_scall_quotaon()
227 struct xfs_mount *mp, in xfs_setqlim_limits() argument
236 xfs_debug(mp, "%shard %lld < %ssoft %lld", tag, hard, tag, in xfs_setqlim_limits()
253 struct xfs_mount *mp, in xfs_setqlim_timer() argument
264 res->timer = xfs_dquot_set_timeout(mp, timer); in xfs_setqlim_timer()
273 struct xfs_mount *mp, in xfs_qm_scall_setqlim() argument
278 struct xfs_quotainfo *q = mp->m_quotainfo; in xfs_qm_scall_setqlim()
299 error = xfs_qm_dqget(mp, id, type, true, &dqp); in xfs_qm_scall_setqlim()
308 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_qm_setqlim, 0, 0, 0, &tp); in xfs_qm_scall_setqlim()
334 (xfs_qcnt_t) XFS_B_TO_FSB(mp, newlim->d_spc_hardlimit) : in xfs_qm_scall_setqlim()
337 (xfs_qcnt_t) XFS_B_TO_FSB(mp, newlim->d_spc_softlimit) : in xfs_qm_scall_setqlim()
342 if (xfs_setqlim_limits(mp, res, qlim, hard, soft, "blk")) in xfs_qm_scall_setqlim()
345 xfs_setqlim_timer(mp, res, qlim, newlim->d_spc_timer); in xfs_qm_scall_setqlim()
349 (xfs_qcnt_t) XFS_B_TO_FSB(mp, newlim->d_rt_spc_hardlimit) : in xfs_qm_scall_setqlim()
352 (xfs_qcnt_t) XFS_B_TO_FSB(mp, newlim->d_rt_spc_softlimit) : in xfs_qm_scall_setqlim()
357 xfs_setqlim_limits(mp, res, qlim, hard, soft, "rtb"); in xfs_qm_scall_setqlim()
359 xfs_setqlim_timer(mp, res, qlim, newlim->d_rt_spc_timer); in xfs_qm_scall_setqlim()
371 xfs_setqlim_limits(mp, res, qlim, hard, soft, "ino"); in xfs_qm_scall_setqlim()
373 xfs_setqlim_timer(mp, res, qlim, newlim->d_ino_timer); in xfs_qm_scall_setqlim()
398 struct xfs_mount *mp, in xfs_qm_scall_getquota_fill_qc() argument
404 dst->d_spc_hardlimit = XFS_FSB_TO_B(mp, dqp->q_blk.hardlimit); in xfs_qm_scall_getquota_fill_qc()
405 dst->d_spc_softlimit = XFS_FSB_TO_B(mp, dqp->q_blk.softlimit); in xfs_qm_scall_getquota_fill_qc()
408 dst->d_space = XFS_FSB_TO_B(mp, dqp->q_blk.reserved); in xfs_qm_scall_getquota_fill_qc()
414 dst->d_rt_spc_hardlimit = XFS_FSB_TO_B(mp, dqp->q_rtb.hardlimit); in xfs_qm_scall_getquota_fill_qc()
415 dst->d_rt_spc_softlimit = XFS_FSB_TO_B(mp, dqp->q_rtb.softlimit); in xfs_qm_scall_getquota_fill_qc()
416 dst->d_rt_space = XFS_FSB_TO_B(mp, dqp->q_rtb.reserved); in xfs_qm_scall_getquota_fill_qc()
448 struct xfs_mount *mp, in xfs_qm_scall_getquota() argument
461 xfs_inodegc_push(mp); in xfs_qm_scall_getquota()
467 error = xfs_qm_dqget(mp, id, type, false, &dqp); in xfs_qm_scall_getquota()
480 xfs_qm_scall_getquota_fill_qc(mp, type, dqp, dst); in xfs_qm_scall_getquota()
493 struct xfs_mount *mp, in xfs_qm_scall_getquota_next() argument
503 xfs_inodegc_push(mp); in xfs_qm_scall_getquota_next()
505 error = xfs_qm_dqget_next(mp, *id, type, &dqp); in xfs_qm_scall_getquota_next()
512 xfs_qm_scall_getquota_fill_qc(mp, type, dqp, dst); in xfs_qm_scall_getquota_next()