Lines Matching refs:mp

63 	struct xfs_mount	*mp;  member
347 #define M_IGEO(mp) (&(mp)->m_ino_geo) argument
404 static inline bool xfs_has_ ## name (const struct xfs_mount *mp) \
406 return mp->m_features & XFS_FEAT_ ## NAME; \
412 static inline void xfs_add_ ## name (struct xfs_mount *mp) \
414 mp->m_features |= XFS_FEAT_ ## NAME; \
415 xfs_sb_version_add ## name(&mp->m_sb); \
442 static inline bool xfs_has_rtgroups(const struct xfs_mount *mp) in __XFS_ADD_FEAT()
445 return xfs_has_metadir(mp); in __XFS_ADD_FEAT()
448 static inline bool xfs_has_rtsb(const struct xfs_mount *mp) in xfs_has_rtsb() argument
451 return xfs_has_rtgroups(mp) && in xfs_has_rtsb()
452 xfs_has_realtime(mp) && in xfs_has_rtsb()
453 !xfs_has_zoned(mp); in xfs_has_rtsb()
456 static inline bool xfs_has_rtrmapbt(const struct xfs_mount *mp) in xfs_has_rtrmapbt() argument
458 return xfs_has_rtgroups(mp) && xfs_has_realtime(mp) && in xfs_has_rtrmapbt()
459 xfs_has_rmapbt(mp); in xfs_has_rtrmapbt()
462 static inline bool xfs_has_rtreflink(const struct xfs_mount *mp) in xfs_has_rtreflink() argument
464 return xfs_has_metadir(mp) && xfs_has_realtime(mp) && in xfs_has_rtreflink()
465 xfs_has_reflink(mp); in xfs_has_rtreflink()
468 static inline bool xfs_has_nonzoned(const struct xfs_mount *mp) in xfs_has_nonzoned() argument
470 return !xfs_has_zoned(mp); in xfs_has_nonzoned()
473 static inline bool xfs_can_sw_atomic_write(struct xfs_mount *mp) in xfs_can_sw_atomic_write() argument
475 return xfs_has_reflink(mp); in xfs_can_sw_atomic_write()
483 static inline bool xfs_has_ ## name (struct xfs_mount *mp) \
486 (mp->m_features & XFS_FEAT_ ## NAME); \
491 static inline void xfs_add_ ## name (struct xfs_mount *mp) \
494 mp->m_features |= XFS_FEAT_ ## NAME; \
495 xfs_sb_version_add ## name(&mp->m_sb); \
508 static inline void xfs_add_attr2(struct xfs_mount *mp) in __XFS_HAS_V4_FEAT()
511 xfs_sb_version_addattr2(&mp->m_sb); in __XFS_HAS_V4_FEAT()
582 static inline bool xfs_is_ ## name (struct xfs_mount *mp) \ in __XFS_HAS_FEAT()
584 return test_bit(XFS_OPSTATE_ ## NAME, &mp->m_opstate); \ in __XFS_HAS_FEAT()
586 static inline bool xfs_clear_ ## name (struct xfs_mount *mp) \
588 return test_and_clear_bit(XFS_OPSTATE_ ## NAME, &mp->m_opstate); \
590 static inline bool xfs_set_ ## name (struct xfs_mount *mp) \
592 return test_and_set_bit(XFS_OPSTATE_ ## NAME, &mp->m_opstate); \
606 static inline bool xfs_is_quotacheck_running(struct xfs_mount *mp)
610 static inline bool xfs_is_resuming_quotaon(struct xfs_mount *mp)
617 static inline bool xfs_clear_resuming_quotaon(struct xfs_mount *mp)
627 xfs_should_warn(struct xfs_mount *mp, long nr)
629 return !test_and_set_bit(nr, &mp->m_opstate);
653 void xfs_do_force_shutdown(struct xfs_mount *mp, uint32_t flags, char *fname,
678 xfs_daddr_to_agno(struct xfs_mount *mp, xfs_daddr_t d) in xfs_daddr_to_agno() argument
680 xfs_rfsblock_t ld = XFS_BB_TO_FSBT(mp, d); in xfs_daddr_to_agno()
681 do_div(ld, mp->m_sb.sb_agblocks); in xfs_daddr_to_agno()
686 xfs_daddr_to_agbno(struct xfs_mount *mp, xfs_daddr_t d) in xfs_daddr_to_agbno() argument
688 xfs_rfsblock_t ld = XFS_BB_TO_FSBT(mp, d); in xfs_daddr_to_agbno()
689 return (xfs_agblock_t) do_div(ld, mp->m_sb.sb_agblocks); in xfs_daddr_to_agbno()
693 uint64_t xfs_default_resblks(struct xfs_mount *mp,
695 extern int xfs_mountfs(xfs_mount_t *mp);
707 uint64_t xfs_freecounter_unavailable(struct xfs_mount *mp,
713 static inline s64 xfs_sum_freecounter(struct xfs_mount *mp, in xfs_sum_freecounter() argument
716 return percpu_counter_sum_positive(&mp->m_free[ctr].count); in xfs_sum_freecounter()
723 static inline s64 xfs_sum_freecounter_raw(struct xfs_mount *mp, in xfs_sum_freecounter_raw() argument
726 return percpu_counter_sum(&mp->m_free[ctr].count); in xfs_sum_freecounter_raw()
733 static inline s64 xfs_estimate_freecounter(struct xfs_mount *mp, in xfs_estimate_freecounter() argument
736 return percpu_counter_read_positive(&mp->m_free[ctr].count); in xfs_estimate_freecounter()
739 static inline int xfs_compare_freecounter(struct xfs_mount *mp, in xfs_compare_freecounter() argument
742 return __percpu_counter_compare(&mp->m_free[ctr].count, rhs, batch); in xfs_compare_freecounter()
745 static inline void xfs_set_freecounter(struct xfs_mount *mp, in xfs_set_freecounter() argument
748 percpu_counter_set(&mp->m_free[ctr].count, val); in xfs_set_freecounter()
751 int xfs_dec_freecounter(struct xfs_mount *mp, enum xfs_free_counter ctr,
753 void xfs_add_freecounter(struct xfs_mount *mp, enum xfs_free_counter ctr,
756 static inline int xfs_dec_fdblocks(struct xfs_mount *mp, uint64_t delta, in xfs_dec_fdblocks() argument
759 return xfs_dec_freecounter(mp, XC_FREE_BLOCKS, delta, reserved); in xfs_dec_fdblocks()
762 static inline void xfs_add_fdblocks(struct xfs_mount *mp, uint64_t delta) in xfs_add_fdblocks() argument
764 xfs_add_freecounter(mp, XC_FREE_BLOCKS, delta); in xfs_add_fdblocks()
767 static inline int xfs_dec_frextents(struct xfs_mount *mp, uint64_t delta) in xfs_dec_frextents() argument
769 return xfs_dec_freecounter(mp, XC_FREE_RTEXTENTS, delta, false); in xfs_dec_frextents()
772 static inline void xfs_add_frextents(struct xfs_mount *mp, uint64_t delta) in xfs_add_frextents() argument
774 xfs_add_freecounter(mp, XC_FREE_RTEXTENTS, delta); in xfs_add_frextents()
779 extern bool xfs_fs_writable(struct xfs_mount *mp, int level);
789 struct xfs_error_cfg * xfs_error_get_cfg(struct xfs_mount *mp,
791 void xfs_force_summary_recalc(struct xfs_mount *mp);
792 int xfs_add_incompat_log_feature(struct xfs_mount *mp, uint32_t feature);
793 bool xfs_clear_incompat_log_features(struct xfs_mount *mp);
796 static inline void xfs_mod_sb_delalloc(struct xfs_mount *mp, int64_t delta) in xfs_mod_sb_delalloc() argument
798 percpu_counter_add(&mp->m_delalloc_blks, delta); in xfs_mod_sb_delalloc()
801 int xfs_set_max_atomic_write_opt(struct xfs_mount *mp,
806 struct xfs_mount *mp, in xfs_group_type_buftarg() argument
811 return mp->m_ddev_targp; in xfs_group_type_buftarg()
813 return mp->m_rtdev_targp; in xfs_group_type_buftarg()