Lines Matching refs:mp
142 struct xfs_mount *mp = XFS_VFSTOM(vfsp); in xfs_qm_showargs() local
145 if (mp->m_qflags & XFS_UQUOTA_ACCT) { in xfs_qm_showargs()
146 (mp->m_qflags & XFS_UQUOTA_ENFD) ? in xfs_qm_showargs()
151 if (mp->m_qflags & XFS_GQUOTA_ACCT) { in xfs_qm_showargs()
152 (mp->m_qflags & XFS_GQUOTA_ENFD) ? in xfs_qm_showargs()
157 if (!(mp->m_qflags & (XFS_UQUOTA_ACCT|XFS_GQUOTA_ACCT))) in xfs_qm_showargs()
171 struct xfs_mount *mp = XFS_VFSTOM(vfsp); in xfs_qm_mount() local
175 xfs_qm_mount_quotainit(mp, args->flags); in xfs_qm_mount()
187 struct xfs_mount *mp = XFS_VFSTOM(vfsp); in xfs_qm_syncall() local
193 if (XFS_IS_QUOTA_ON(mp)) { in xfs_qm_syncall()
194 if ((error = xfs_qm_sync(mp, flags))) { in xfs_qm_syncall()
199 ASSERT(error != EIO || XFS_FORCED_SHUTDOWN(mp)); in xfs_qm_syncall()
200 if (XFS_FORCED_SHUTDOWN(mp)) { in xfs_qm_syncall()
214 xfs_mount_t *mp) in xfs_mount_reset_sbqflags() argument
219 mp->m_qflags = 0; in xfs_mount_reset_sbqflags()
224 if (mp->m_sb.sb_qflags == 0) in xfs_mount_reset_sbqflags()
226 s = XFS_SB_LOCK(mp); in xfs_mount_reset_sbqflags()
227 mp->m_sb.sb_qflags = 0; in xfs_mount_reset_sbqflags()
228 XFS_SB_UNLOCK(mp, s); in xfs_mount_reset_sbqflags()
234 if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) in xfs_mount_reset_sbqflags()
237 xfs_fs_cmn_err(CE_NOTE, mp, "Writing superblock quota changes"); in xfs_mount_reset_sbqflags()
239 tp = xfs_trans_alloc(mp, XFS_TRANS_QM_SBCHANGE); in xfs_mount_reset_sbqflags()
240 if (xfs_trans_reserve(tp, 0, mp->m_sb.sb_sectsize + 128, 0, 0, in xfs_mount_reset_sbqflags()
243 xfs_fs_cmn_err(CE_ALERT, mp, in xfs_mount_reset_sbqflags()
253 xfs_mount_t *mp, in xfs_qm_newmount() argument
263 quotaondisk = XFS_SB_VERSION_HASQUOTA(&mp->m_sb) && in xfs_qm_newmount()
264 mp->m_sb.sb_qflags & (XFS_UQUOTA_ACCT|XFS_GQUOTA_ACCT); in xfs_qm_newmount()
267 uquotaondisk = mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT; in xfs_qm_newmount()
268 gquotaondisk = mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT; in xfs_qm_newmount()
278 if (((uquotaondisk && !XFS_IS_UQUOTA_ON(mp)) || in xfs_qm_newmount()
279 (!uquotaondisk && XFS_IS_UQUOTA_ON(mp)) || in xfs_qm_newmount()
280 (gquotaondisk && !XFS_IS_GQUOTA_ON(mp)) || in xfs_qm_newmount()
281 (!gquotaondisk && XFS_IS_GQUOTA_ON(mp))) && in xfs_qm_newmount()
282 xfs_dev_is_read_only(mp, "changing quota state")) { in xfs_qm_newmount()
291 if (XFS_IS_QUOTA_ON(mp) || quotaondisk) { in xfs_qm_newmount()
296 if (quotaondisk && !XFS_QM_NEED_QUOTACHECK(mp)) { in xfs_qm_newmount()
303 xfs_qm_mount_quotas(mp, 0); in xfs_qm_newmount()
313 *quotaflags = mp->m_qflags; in xfs_qm_newmount()
314 mp->m_qflags = 0; in xfs_qm_newmount()
323 xfs_mount_t *mp, in xfs_qm_endmount() argument
329 ASSERT(mp->m_qflags == 0); in xfs_qm_endmount()
330 mp->m_qflags = quotaflags; in xfs_qm_endmount()
331 xfs_qm_mount_quotas(mp, mfsi_flags); in xfs_qm_endmount()
335 if (! (XFS_IS_QUOTA_ON(mp))) in xfs_qm_endmount()
336 xfs_fs_cmn_err(CE_NOTE, mp, "Disk quotas not turned on"); in xfs_qm_endmount()
338 xfs_fs_cmn_err(CE_NOTE, mp, "Disk quotas turned on"); in xfs_qm_endmount()
342 if (XFS_IS_QUOTA_ON(mp) && xfs_qm_internalqcheck(mp)) in xfs_qm_endmount()