Lines Matching +full:retain +full:- +full:state +full:- +full:shutdown
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
45 #define XFS_ERR_RETRY_FOREVER -1
50 * signed 32-bit long is sufficient for a HZ value up to 24855. Making it
51 * signed lets us store the special "-1" value, meaning retry forever.
56 long retry_timeout; /* in jiffies, -1 = infinite */
60 * Per-cpu deferred inode inactivation GC lists.
85 * degenerate case of a pre-rtgroups filesystem, the incore rtgroup
86 * pretends to have a zero-block and zero-blklog rtgroup.
110 * Mask to extract the group-relative block number from a FSB.
111 * For a pre-rtgroups filesystem we pretend to have one very large
112 * rtgroup, so this mask must be 64-bit.
145 * The struct xfsmount layout is optimised to separate read-mostly variables
146 * from variables that are frequently modified. We put the read-mostly variables
149 * Typically, read-mostly variables are those that are set at mount time and
172 struct xfs_mru_cache *m_filestream; /* per-mount filestream data */
182 uint8_t m_blkbb_log; /* blocklog - BBSHIFT */
184 uint8_t m_sectbb_log; /* sectlog - BBSHIFT */
187 uint m_blockmask; /* sb_blocksize-1 */
232 unsigned long m_opstate; /* dynamic state flags */
235 bool m_finobt_nores; /* no per-AG finobt resv. */
245 * Bitsets of per-fs metadata that have been checked and/or are sick.
258 * End of read-mostly variables. Frequently written variables and locks
261 * the read-mostly variables.
297 struct xstats m_stats; /* per-fs stats */
348 #define M_IGEO(mp) (&(mp)->m_ino_geo)
364 #define XFS_FEAT_ASCIICI (1ULL << 8) /* ASCII only case-insens. */
371 #define XFS_FEAT_PQUOTINO (1ULL << 15) /* non-shared proj/grp quotas */
397 #define XFS_FEAT_GRPID (1ULL << 55) /* group-ID assigned from directory */
404 #define XFS_FEAT_NORECOVERY (1ULL << 62) /* no recovery - dirty fs */
410 return mp->m_features & XFS_FEAT_ ## NAME; \
418 mp->m_features |= XFS_FEAT_ ## NAME; \
419 xfs_sb_version_add ## name(&mp->m_sb); \
490 (mp->m_features & XFS_FEAT_ ## NAME); \
498 mp->m_features |= XFS_FEAT_ ## NAME; \
499 xfs_sb_version_add ## name(&mp->m_sb); \
516 * These do not change dynamically - features that can come and go, such as 32 in __XFS_HAS_V4_FEAT()
517 * bit inodes and read-only state, are kept as operational state rather than in __XFS_HAS_V4_FEAT()
538 * Operational mount state flags in __XFS_HAS_V4_FEAT()
546 #define XFS_OPSTATE_READONLY 4 /* read-only fs */ in __XFS_HAS_V4_FEAT()
556 * to process queued blockgc work. If not, inodes retain their preallocations in __XFS_HAS_V4_FEAT()
585 return test_bit(XFS_OPSTATE_ ## NAME, &mp->m_opstate); \ in __XFS_HAS_V4_FEAT()
589 return test_and_clear_bit(XFS_OPSTATE_ ## NAME, &mp->m_opstate); \
593 return test_and_set_bit(XFS_OPSTATE_ ## NAME, &mp->m_opstate); \
598 __XFS_IS_OPSTATE(shutdown, SHUTDOWN)
630 return !test_and_set_bit(nr, &mp->m_opstate);
636 { (1UL << XFS_OPSTATE_SHUTDOWN), "shutdown" }, \
648 * Max and min values for mount-option defined I/O
661 #define SHUTDOWN_FORCE_UMOUNT (1u << 2) /* shutdown from a forced unmount */
662 #define SHUTDOWN_CORRUPT_INCORE (1u << 3) /* corrupt in-memory structures */
682 do_div(ld, mp->m_sb.sb_agblocks); in xfs_daddr_to_agno()
690 return (xfs_agblock_t) do_div(ld, mp->m_sb.sb_agblocks); in xfs_daddr_to_agbno()
717 return percpu_counter_sum_positive(&mp->m_free[ctr].count); in xfs_sum_freecounter()
727 return percpu_counter_sum(&mp->m_free[ctr].count); in xfs_sum_freecounter_raw()
731 * This just provides and estimate without the cpu-local updates, use
737 return percpu_counter_read_positive(&mp->m_free[ctr].count); in xfs_estimate_freecounter()
743 return __percpu_counter_compare(&mp->m_free[ctr].count, rhs, batch); in xfs_compare_freecounter()
749 percpu_counter_set(&mp->m_free[ctr].count, val); in xfs_set_freecounter()
799 percpu_counter_add(&mp->m_delalloc_blks, delta); in xfs_mod_sb_delalloc()