blob: ed7064596f94a2a6b1cafc3bbb5c969b8a6f7ddb [file] [log] [blame]
Dave Chinner0b61f8a2018-06-05 19:42:14 -07001// SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
Nathan Scott7b718762005-11-02 14:58:39 +11003 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 */
6#ifndef __XFS_MOUNT_H__
7#define __XFS_MOUNT_H__
8
Mark Tinguelyad223e62012-06-14 09:22:15 -05009struct xlog;
Linus Torvalds1da177e2005-04-16 15:20:36 -070010struct xfs_inode;
David Chinner2a82b8b2007-07-11 11:09:12 +100011struct xfs_mru_cache;
David Chinner82fa9012008-10-30 17:38:26 +110012struct xfs_ail;
Christoph Hellwig7d095252009-06-08 15:33:32 +020013struct xfs_quotainfo;
Dave Chinner0650b552014-06-06 15:01:58 +100014struct xfs_da_geometry;
Dave Chinner07b64032021-06-02 10:48:24 +100015struct xfs_perag;
Christoph Hellwig7d095252009-06-08 15:33:32 +020016
Dave Chinner055388a2011-01-04 11:35:03 +110017/* dynamic preallocation free space thresholds, 5% down to 1% */
18enum {
19 XFS_LOWSP_1_PCNT = 0,
20 XFS_LOWSP_2_PCNT,
21 XFS_LOWSP_3_PCNT,
22 XFS_LOWSP_4_PCNT,
23 XFS_LOWSP_5_PCNT,
24 XFS_LOWSP_MAX,
25};
26
Carlos Maiolino192852b2016-05-18 10:58:51 +100027/*
28 * Error Configuration
29 *
30 * Error classes define the subsystem the configuration belongs to.
31 * Error numbers define the errors that are configurable.
32 */
33enum {
Carlos Maiolinoffd40ef2016-05-18 11:01:00 +100034 XFS_ERR_METADATA,
Carlos Maiolino192852b2016-05-18 10:58:51 +100035 XFS_ERR_CLASS_MAX,
36};
37enum {
Carlos Maiolinoffd40ef2016-05-18 11:01:00 +100038 XFS_ERR_DEFAULT,
Carlos Maiolinoe0a431b32016-05-18 11:09:28 +100039 XFS_ERR_EIO,
40 XFS_ERR_ENOSPC,
41 XFS_ERR_ENODEV,
Carlos Maiolino192852b2016-05-18 10:58:51 +100042 XFS_ERR_ERRNO_MAX,
43};
44
Carlos Maiolinoa5ea70d2016-05-18 11:08:15 +100045#define XFS_ERR_RETRY_FOREVER -1
46
Eric Sandeen77169812016-09-14 07:51:30 +100047/*
48 * Although retry_timeout is in jiffies which is normally an unsigned long,
49 * we limit the retry timeout to 86400 seconds, or one day. So even a
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.
52 */
Carlos Maiolino192852b2016-05-18 10:58:51 +100053struct xfs_error_cfg {
54 struct xfs_kobj kobj;
55 int max_retries;
Eric Sandeen77169812016-09-14 07:51:30 +100056 long retry_timeout; /* in jiffies, -1 = infinite */
Carlos Maiolino192852b2016-05-18 10:58:51 +100057};
58
Dave Chinnerb0dff462020-05-20 13:17:11 -070059/*
60 * The struct xfsmount layout is optimised to separate read-mostly variables
61 * from variables that are frequently modified. We put the read-mostly variables
62 * first, then place all the other variables at the end.
63 *
64 * Typically, read-mostly variables are those that are set at mount time and
65 * never changed again, or only change rarely as a result of things like sysfs
66 * knobs being tweaked.
67 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070068typedef struct xfs_mount {
Dave Chinner501ab322015-02-23 21:19:28 +110069 struct xfs_sb m_sb; /* copy of fs superblock */
Dave Chinnerb0dff462020-05-20 13:17:11 -070070 struct super_block *m_super;
71 struct xfs_ail *m_ail; /* fs active log item list */
Linus Torvalds1da177e2005-04-16 15:20:36 -070072 struct xfs_buf *m_sb_bp; /* buffer for superblock */
Nathan Scottfc1f8c12005-11-02 11:44:33 +110073 char *m_rtname; /* realtime device name */
74 char *m_logname; /* external log device name */
Dave Chinner0650b552014-06-06 15:01:58 +100075 struct xfs_da_geometry *m_dir_geo; /* directory block geometry */
76 struct xfs_da_geometry *m_attr_geo; /* attribute block geometry */
Mark Tinguelyad223e62012-06-14 09:22:15 -050077 struct xlog *m_log; /* log specific stuff */
Linus Torvalds1da177e2005-04-16 15:20:36 -070078 struct xfs_inode *m_rbmip; /* pointer to bitmap inode */
79 struct xfs_inode *m_rsumip; /* pointer to summary inode */
80 struct xfs_inode *m_rootip; /* pointer to root directory */
81 struct xfs_quotainfo *m_quotainfo; /* disk quota information */
82 xfs_buftarg_t *m_ddev_targp; /* saves taking the address */
83 xfs_buftarg_t *m_logdev_targp;/* ptr to log device */
84 xfs_buftarg_t *m_rtdev_targp; /* ptr to rt device */
Dave Chinner0ed17f02021-08-06 11:05:38 -070085 struct list_head m_mount_list; /* global mount list */
Dave Chinnerb0dff462020-05-20 13:17:11 -070086 /*
87 * Optional cache of rt summary level per bitmap block with the
88 * invariant that m_rsum_cache[bbno] <= the minimum i for which
89 * rsum[i][bbno] != 0. Reads and writes are serialized by the rsumip
90 * inode lock.
91 */
92 uint8_t *m_rsum_cache;
93 struct xfs_mru_cache *m_filestream; /* per-mount filestream data */
94 struct workqueue_struct *m_buf_workqueue;
95 struct workqueue_struct *m_unwritten_workqueue;
96 struct workqueue_struct *m_cil_workqueue;
97 struct workqueue_struct *m_reclaim_workqueue;
Darrick J. Wong3fef46f2021-03-22 09:51:55 -070098 struct workqueue_struct *m_gc_workqueue;
Dave Chinnerb0dff462020-05-20 13:17:11 -070099 struct workqueue_struct *m_sync_workqueue;
100
101 int m_bsize; /* fs logical block size */
Darrick J. Wongc8ce5402017-06-16 11:00:05 -0700102 uint8_t m_blkbit_log; /* blocklog + NBBY */
103 uint8_t m_blkbb_log; /* blocklog - BBSHIFT */
104 uint8_t m_agno_log; /* log #ag's */
Dave Chinnerb0dff462020-05-20 13:17:11 -0700105 uint8_t m_sectbb_log; /* sectlog - BBSHIFT */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106 uint m_blockmask; /* sb_blocksize-1 */
107 uint m_blockwsize; /* sb_blocksize in words */
108 uint m_blockwmask; /* blockwsize-1 */
Christoph Hellwig60197e82008-10-30 17:11:19 +1100109 uint m_alloc_mxr[2]; /* max alloc btree records */
110 uint m_alloc_mnr[2]; /* min alloc btree records */
111 uint m_bmap_dmxr[2]; /* max bmap btree records */
112 uint m_bmap_dmnr[2]; /* min bmap btree records */
Darrick J. Wong035e00a2016-08-03 11:36:07 +1000113 uint m_rmap_mxr[2]; /* max rmap btree records */
114 uint m_rmap_mnr[2]; /* min rmap btree records */
Darrick J. Wong1946b912016-10-03 09:11:18 -0700115 uint m_refc_mxr[2]; /* max refc btree records */
116 uint m_refc_mnr[2]; /* min refc btree records */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700117 uint m_ag_maxlevels; /* XFS_AG_MAXLEVELS */
118 uint m_bm_maxlevels[2]; /* XFS_BM_MAXLEVELS */
Darrick J. Wong035e00a2016-08-03 11:36:07 +1000119 uint m_rmap_maxlevels; /* max rmap btree levels */
Darrick J. Wong1946b912016-10-03 09:11:18 -0700120 uint m_refc_maxlevels; /* max refcount btree level */
Darrick J. Wong80180262016-08-03 11:31:47 +1000121 xfs_extlen_t m_ag_prealloc_blocks; /* reserved ag blocks */
Darrick J. Wong52548852016-08-03 11:38:24 +1000122 uint m_alloc_set_aside; /* space we can't use */
123 uint m_ag_max_usable; /* max space per AG */
Dave Chinnerb0dff462020-05-20 13:17:11 -0700124 int m_dalign; /* stripe unit */
125 int m_swidth; /* stripe width */
126 xfs_agnumber_t m_maxagi; /* highest inode alloc group */
127 uint m_allocsize_log;/* min write size log bytes */
128 uint m_allocsize_blocks; /* min write size blocks */
129 int m_logbufs; /* number of log buffers */
130 int m_logbsize; /* size of each log buffer */
131 uint m_rsumlevels; /* rt summary levels */
132 uint m_rsumsize; /* size of rt summary, bytes */
133 int m_fixedfsid[2]; /* unchanged for life of FS */
134 uint m_qflags; /* quota status flags */
135 uint64_t m_flags; /* global mount flags */
136 int64_t m_low_space[XFS_LOWSP_MAX];
137 struct xfs_ino_geometry m_ino_geo; /* inode geometry */
138 struct xfs_trans_resv m_resv; /* precomputed res values */
139 /* low free space thresholds */
140 bool m_always_cow;
141 bool m_fail_unmount;
142 bool m_finobt_nores; /* no per-AG finobt resv. */
143 bool m_update_sb; /* sb needs update in mount */
144
145 /*
146 * Bitsets of per-fs metadata that have been checked and/or are sick.
147 * Callers must hold m_sb_lock to access these two fields.
148 */
149 uint8_t m_fs_checked;
150 uint8_t m_fs_sick;
151 /*
152 * Bitsets of rt metadata that have been checked and/or are sick.
153 * Callers must hold m_sb_lock to access this field.
154 */
155 uint8_t m_rt_checked;
156 uint8_t m_rt_sick;
157
158 /*
159 * End of read-mostly variables. Frequently written variables and locks
160 * should be placed below this comment from now on. The first variable
161 * here is marked as cacheline aligned so they it is separated from
162 * the read-mostly variables.
163 */
164
165 spinlock_t ____cacheline_aligned m_sb_lock; /* sb counter lock */
166 struct percpu_counter m_icount; /* allocated inodes counter */
167 struct percpu_counter m_ifree; /* free inodes counter */
168 struct percpu_counter m_fdblocks; /* free block counter */
169 /*
170 * Count of data device blocks reserved for delayed allocations,
171 * including indlen blocks. Does not include allocated CoW staging
172 * extents or anything related to the rt device.
173 */
174 struct percpu_counter m_delalloc_blks;
Brian Foster16eaab82021-04-28 15:05:50 -0700175 /*
176 * Global count of allocation btree blocks in use across all AGs. Only
177 * used when perag reservation is enabled. Helps prevent block
178 * reservation from attempting to reserve allocation btree blocks.
179 */
180 atomic64_t m_allocbt_blks;
Dave Chinnerb0dff462020-05-20 13:17:11 -0700181
Dave Chinner1c1c6eb2010-01-11 11:47:44 +0000182 struct radix_tree_root m_perag_tree; /* per-ag accounting info */
183 spinlock_t m_perag_lock; /* lock for m_perag_tree */
Darrick J. Wongc8ce5402017-06-16 11:00:05 -0700184 uint64_t m_resblks; /* total reserved blocks */
185 uint64_t m_resblks_avail;/* available reserved blocks */
186 uint64_t m_resblks_save; /* reserved blks @ remount,ro */
Dave Chinnera7b339f2011-04-08 12:45:07 +1000187 struct delayed_work m_reclaim_work; /* background inode reclaim */
Brian Fostera31b1d32014-07-15 08:07:01 +1000188 struct xfs_kobj m_kobj;
Carlos Maiolino192852b2016-05-18 10:58:51 +1000189 struct xfs_kobj m_error_kobj;
Carlos Maiolinoffd40ef2016-05-18 11:01:00 +1000190 struct xfs_kobj m_error_meta_kobj;
Carlos Maiolino192852b2016-05-18 10:58:51 +1000191 struct xfs_error_cfg m_error_cfg[XFS_ERR_CLASS_MAX][XFS_ERR_ERRNO_MAX];
Bill O'Donnell225e4632015-10-12 18:21:19 +1100192 struct xstats m_stats; /* per-fs stats */
Dave Chinnerb0dff462020-05-20 13:17:11 -0700193 xfs_agnumber_t m_agfrotor; /* last ag where space found */
194 xfs_agnumber_t m_agirotor; /* last ag dir inode alloced */
195 spinlock_t m_agirotor_lock;/* .. and lock protecting it */
Christoph Hellwigaa6bf012012-02-29 09:53:48 +0000196
Darrick J. Wongf0f7a672020-04-12 13:11:10 -0700197 /*
198 * Workqueue item so that we can coalesce multiple inode flush attempts
199 * into a single flush.
200 */
201 struct work_struct m_flush_inodes_work;
Christoph Hellwig52785112015-02-16 11:49:23 +1100202
203 /*
204 * Generation of the filesysyem layout. This is incremented by each
205 * growfs, and used by the pNFS server to ensure the client updates
206 * its view of the block device once it gets a layout that might
207 * reference the newly added blocks. Does not need to be persistent
208 * as long as we only allow file system size increments, but if we
209 * ever support shrinks it would have to be persisted in addition
210 * to various other kinds of pain inflicted on the pNFS server.
211 */
Darrick J. Wongc8ce5402017-06-16 11:00:05 -0700212 uint32_t m_generation;
Dave Chinnerb0dff462020-05-20 13:17:11 -0700213 struct mutex m_growlock; /* growfs mutex */
Brian Foster801cc4e2016-03-15 11:42:44 +1100214
215#ifdef DEBUG
216 /*
Darrick J. Wong31965ef2017-06-20 17:54:46 -0700217 * Frequency with which errors are injected. Replaces xfs_etest; the
218 * value stored in here is the inverse of the frequency with which the
219 * error triggers. 1 = always, 2 = half the time, etc.
220 */
221 unsigned int *m_errortag;
Darrick J. Wongc6840102017-06-20 17:54:47 -0700222 struct xfs_kobj m_errortag_kobj;
Brian Foster801cc4e2016-03-15 11:42:44 +1100223#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700224} xfs_mount_t;
225
Darrick J. Wongef325952019-06-05 11:19:34 -0700226#define M_IGEO(mp) (&(mp)->m_ino_geo)
227
Linus Torvalds1da177e2005-04-16 15:20:36 -0700228/*
229 * Flags for m_flags.
230 */
David Chinner92821e22007-05-24 15:26:31 +1000231#define XFS_MOUNT_WSYNC (1ULL << 0) /* for nfs - all metadata ops
Linus Torvalds1da177e2005-04-16 15:20:36 -0700232 must be synchronous except
233 for space allocations */
Carlos Maiolinoe6b3bb72016-05-18 11:11:27 +1000234#define XFS_MOUNT_UNMOUNTING (1ULL << 1) /* filesystem is unmounting */
David Chinner92821e22007-05-24 15:26:31 +1000235#define XFS_MOUNT_WAS_CLEAN (1ULL << 3)
Nathan Scotte718eeb42005-11-02 15:09:22 +1100236#define XFS_MOUNT_FS_SHUTDOWN (1ULL << 4) /* atomic stop of all filesystem
Linus Torvalds1da177e2005-04-16 15:20:36 -0700237 operations, typically for
238 disk errors in metadata */
Christoph Hellwige84661a2011-05-20 13:45:32 +0000239#define XFS_MOUNT_DISCARD (1ULL << 5) /* discard unused blocks */
Nathan Scotte718eeb42005-11-02 15:09:22 +1100240#define XFS_MOUNT_NOALIGN (1ULL << 7) /* turn off stripe alignment
Linus Torvalds1da177e2005-04-16 15:20:36 -0700241 allocations */
Nathan Scott13059ff2006-01-11 15:32:01 +1100242#define XFS_MOUNT_ATTR2 (1ULL << 8) /* allow use of attr2 format */
Christoph Hellwigbd186aa2007-08-30 17:21:12 +1000243#define XFS_MOUNT_GRPID (1ULL << 9) /* group-ID assigned from directory */
Nathan Scotte718eeb42005-11-02 15:09:22 +1100244#define XFS_MOUNT_NORECOVERY (1ULL << 10) /* no recovery - dirty fs */
Christoph Hellwig3274d002019-10-28 08:41:45 -0700245#define XFS_MOUNT_ALLOCSIZE (1ULL << 12) /* specified allocation size */
Eric Sandeen12c3f052016-03-02 09:58:09 +1100246#define XFS_MOUNT_SMALL_INUMS (1ULL << 14) /* user wants 32bit inodes */
247#define XFS_MOUNT_32BITINODES (1ULL << 15) /* inode32 allocator active */
Nathan Scotte718eeb42005-11-02 15:09:22 +1100248#define XFS_MOUNT_NOUUID (1ULL << 16) /* ignore uuid during mount */
Josef Jeff Sipek1bd960e2008-02-29 13:58:40 +1100249#define XFS_MOUNT_IKEEP (1ULL << 18) /* keep empty inode clusters*/
Nathan Scotte718eeb42005-11-02 15:09:22 +1100250#define XFS_MOUNT_SWALLOC (1ULL << 19) /* turn on stripe width
Linus Torvalds1da177e2005-04-16 15:20:36 -0700251 * allocation */
Christoph Hellwigbd186aa2007-08-30 17:21:12 +1000252#define XFS_MOUNT_RDONLY (1ULL << 20) /* read-only fs */
Nathan Scotte718eeb42005-11-02 15:09:22 +1100253#define XFS_MOUNT_DIRSYNC (1ULL << 21) /* synchronous directory ops */
Christoph Hellwig7c6b94b2019-10-28 08:41:46 -0700254#define XFS_MOUNT_LARGEIO (1ULL << 22) /* report large preferred
David Chinnere8c8b3a2005-11-02 10:33:05 +1100255 * I/O size in stat() */
David Chinner2a82b8b2007-07-11 11:09:12 +1000256#define XFS_MOUNT_FILESTREAMS (1ULL << 24) /* enable the filestreams
257 allocator */
Tim Shimmin7c12f292008-04-30 18:15:28 +1000258#define XFS_MOUNT_NOATTR2 (1ULL << 25) /* disable use of attr2 format */
Ira Weiny606723d2020-05-04 09:02:41 -0700259#define XFS_MOUNT_DAX_ALWAYS (1ULL << 26)
Ira Weiny8d6c3442020-05-04 09:02:42 -0700260#define XFS_MOUNT_DAX_NEVER (1ULL << 27)
Dave Chinnercbe4dab2015-06-04 09:19:18 +1000261
Linus Torvalds1da177e2005-04-16 15:20:36 -0700262/*
Nathan Scott1f443ad2005-05-05 13:28:29 -0700263 * Max and min values for mount-option defined I/O
264 * preallocation sizes.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700265 */
Nathan Scott1f443ad2005-05-05 13:28:29 -0700266#define XFS_MAX_IO_LOG 30 /* 1G */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700267#define XFS_MIN_IO_LOG PAGE_SHIFT
268
David Chinner92821e22007-05-24 15:26:31 +1000269#define XFS_LAST_UNMOUNT_WAS_CLEAN(mp) \
270 ((mp)->m_flags & XFS_MOUNT_WAS_CLEAN)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700271#define XFS_FORCED_SHUTDOWN(mp) ((mp)->m_flags & XFS_MOUNT_FS_SHUTDOWN)
Christoph Hellwig745f6912007-08-30 17:20:39 +1000272void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname,
273 int lnnum);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700274#define xfs_force_shutdown(m,f) \
Christoph Hellwig745f6912007-08-30 17:20:39 +1000275 xfs_do_force_shutdown(m, f, __FILE__, __LINE__)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700276
Christoph Hellwig2b5decd2008-11-28 14:23:36 +1100277#define SHUTDOWN_META_IO_ERROR 0x0001 /* write attempt to metadata failed */
278#define SHUTDOWN_LOG_IO_ERROR 0x0002 /* write attempt to the log failed */
279#define SHUTDOWN_FORCE_UMOUNT 0x0004 /* shutdown from a forced unmount */
280#define SHUTDOWN_CORRUPT_INCORE 0x0008 /* corrupt in-memory data structures */
Christoph Hellwig2b5decd2008-11-28 14:23:36 +1100281
Linus Torvalds1da177e2005-04-16 15:20:36 -0700282/*
Linus Torvalds1da177e2005-04-16 15:20:36 -0700283 * Flags for xfs_mountfs
284 */
Nathan Scott764d1f82006-03-31 13:04:17 +1000285#define XFS_MFSI_QUIET 0x40 /* Be silent if mount errors found */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700286
Nathan Scotta844f452005-11-02 14:38:42 +1100287static inline xfs_agnumber_t
288xfs_daddr_to_agno(struct xfs_mount *mp, xfs_daddr_t d)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700289{
Eric Sandeen4f1adf32017-04-19 15:19:32 -0700290 xfs_rfsblock_t ld = XFS_BB_TO_FSBT(mp, d);
Nathan Scotta844f452005-11-02 14:38:42 +1100291 do_div(ld, mp->m_sb.sb_agblocks);
292 return (xfs_agnumber_t) ld;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700293}
294
Nathan Scotta844f452005-11-02 14:38:42 +1100295static inline xfs_agblock_t
296xfs_daddr_to_agbno(struct xfs_mount *mp, xfs_daddr_t d)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700297{
Eric Sandeen4f1adf32017-04-19 15:19:32 -0700298 xfs_rfsblock_t ld = XFS_BB_TO_FSBT(mp, d);
Nathan Scotta844f452005-11-02 14:38:42 +1100299 return (xfs_agblock_t) do_div(ld, mp->m_sb.sb_agblocks);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700300}
301
Dave Chinner07b64032021-06-02 10:48:24 +1000302int xfs_buf_hash_init(struct xfs_perag *pag);
303void xfs_buf_hash_destroy(struct xfs_perag *pag);
Lucas Stach6031e732016-12-07 17:36:36 +1100304
Darrick J. Wongaf3b6382015-11-03 13:06:34 +1100305extern void xfs_uuid_table_free(void);
Darrick J. Wongc8ce5402017-06-16 11:00:05 -0700306extern uint64_t xfs_default_resblks(xfs_mount_t *mp);
Christoph Hellwig42490232008-08-13 16:49:32 +1000307extern int xfs_mountfs(xfs_mount_t *mp);
Christoph Hellwig41b5c2e2008-08-13 16:49:57 +1000308extern void xfs_unmountfs(xfs_mount_t *);
Dave Chinner964aa8d92015-02-23 21:24:37 +1100309
Dave Chinner0d485ad2015-02-23 21:22:03 +1100310extern int xfs_mod_fdblocks(struct xfs_mount *mp, int64_t delta,
311 bool reserved);
Dave Chinnerbab98bb2015-02-23 21:22:54 +1100312extern int xfs_mod_frextents(struct xfs_mount *mp, int64_t delta);
313
Nathan Scott764d1f82006-03-31 13:04:17 +1000314extern int xfs_readsb(xfs_mount_t *, int);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700315extern void xfs_freesb(xfs_mount_t *);
Brian Foster91ee5752014-11-28 14:02:59 +1100316extern bool xfs_fs_writable(struct xfs_mount *mp, int level);
Darrick J. Wongc8ce5402017-06-16 11:00:05 -0700317extern int xfs_sb_validate_fsb_count(struct xfs_sb *, uint64_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700318
Christoph Hellwigd7658d42010-02-17 19:36:13 +0000319extern int xfs_dev_is_read_only(struct xfs_mount *, char *);
320
Dave Chinner055388a2011-01-04 11:35:03 +1100321extern void xfs_set_low_space_thresholds(struct xfs_mount *);
322
Dave Chinner3fbbbea2015-11-03 12:27:22 +1100323int xfs_zero_extent(struct xfs_inode *ip, xfs_fsblock_t start_fsb,
324 xfs_off_t count_fsb);
325
Carlos Maiolinodf309392016-05-18 11:05:33 +1000326struct xfs_error_cfg * xfs_error_get_cfg(struct xfs_mount *mp,
327 int error_class, int error);
Darrick J. Wongf467cad2018-07-20 09:28:40 -0700328void xfs_force_summary_recalc(struct xfs_mount *mp);
Darrick J. Wong9fe82b82019-04-25 18:26:22 -0700329void xfs_mod_delalloc(struct xfs_mount *mp, int64_t delta);
Carlos Maiolinodf309392016-05-18 11:05:33 +1000330
Linus Torvalds1da177e2005-04-16 15:20:36 -0700331#endif /* __XFS_MOUNT_H__ */