]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - include/xfs_mount.h
cmd/xfs/bmap/Makefile 1.8 Renamed to cmd/xfsprogs/bmap/Makefile
[thirdparty/xfsprogs-dev.git] / include / xfs_mount.h
1 /*
2 * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it would be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 *
12 * Further, this software is distributed without any warranty that it is
13 * free of the rightful claim of any third person regarding infringement
14 * or the like. Any license provided herein, whether implied or
15 * otherwise, applies only to this software file. Patent licenses, if
16 * any, provided herein do not apply to combinations of this program with
17 * other software, or any other product whatsoever.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write the Free Software Foundation, Inc., 59
21 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
22 *
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
25 *
26 * http://www.sgi.com
27 *
28 * For further information regarding this notice, see:
29 *
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
31 */
32 #ifndef __XFS_MOUNT_H__
33 #define __XFS_MOUNT_H__
34
35
36 typedef struct xfs_trans_reservations {
37 uint tr_write; /* extent alloc trans */
38 uint tr_itruncate; /* truncate trans */
39 uint tr_rename; /* rename trans */
40 uint tr_link; /* link trans */
41 uint tr_remove; /* unlink trans */
42 uint tr_symlink; /* symlink trans */
43 uint tr_create; /* create trans */
44 uint tr_mkdir; /* mkdir trans */
45 uint tr_ifree; /* inode free trans */
46 uint tr_ichange; /* inode update trans */
47 uint tr_growdata; /* fs data section grow trans */
48 uint tr_swrite; /* sync write inode trans */
49 uint tr_addafork; /* cvt inode to attributed trans */
50 uint tr_writeid; /* write setuid/setgid file */
51 uint tr_attrinval; /* attr fork buffer invalidation */
52 uint tr_attrset; /* set/create an attribute */
53 uint tr_attrrm; /* remove an attribute */
54 uint tr_clearagi; /* clear bad agi unlinked ino bucket */
55 uint tr_growrtalloc; /* grow realtime allocations */
56 uint tr_growrtzero; /* grow realtime zeroing */
57 uint tr_growrtfree; /* grow realtime freeing */
58 } xfs_trans_reservations_t;
59
60
61 #ifndef __KERNEL__
62 /*
63 * Moved here from xfs_ag.h to avoid reordering header files
64 */
65 #define XFS_DADDR_TO_AGNO(mp,d) \
66 ((xfs_agnumber_t)(XFS_BB_TO_FSBT(mp, d) / (mp)->m_sb.sb_agblocks))
67 #define XFS_DADDR_TO_AGBNO(mp,d) \
68 ((xfs_agblock_t)(XFS_BB_TO_FSBT(mp, d) % (mp)->m_sb.sb_agblocks))
69 #else
70 struct cred;
71 struct mounta;
72 struct vfs;
73 struct vnode;
74 struct xfs_args;
75 struct xfs_ihash;
76 struct xfs_chash;
77 struct xfs_inode;
78 struct xfs_perag;
79 struct xfs_quotainfo;
80 struct xfs_iocore;
81 struct xfs_dio;
82 struct xfs_bmbt_irec;
83 struct xfs_bmap_free;
84
85 #if defined(INTERRUPT_LATENCY_TESTING)
86 #define SPLDECL(s)
87 #define AIL_LOCK_T mutex_t
88 #define AIL_LOCKINIT(x,y) mutex_init(x,MUTEX_DEFAULT, y)
89 #define AIL_LOCK_DESTROY(x) mutex_destroy(x)
90 #define AIL_LOCK(mp,s) mutex_lock(&(mp)->m_ail_lock, PZERO)
91 #define AIL_UNLOCK(mp,s) mutex_unlock(&(mp)->m_ail_lock)
92 #else /* !INTERRUPT_LATENCY_TESTING */
93 #define SPLDECL(s) int s
94 #define AIL_LOCK_T lock_t
95 #define AIL_LOCKINIT(x,y) spinlock_init(x,y)
96 #define AIL_LOCK_DESTROY(x) spinlock_destroy(x)
97 #define AIL_LOCK(mp,s) s=mutex_spinlock(&(mp)->m_ail_lock)
98 #define AIL_UNLOCK(mp,s) mutex_spinunlock(&(mp)->m_ail_lock, s)
99 #endif /* !INTERRUPT_LATENCY_TESTING */
100
101
102 /* Prototypes and functions for I/O core modularization, a vector
103 * of functions is used to indirect from xfs/cxfs independent code
104 * to the xfs/cxfs dependent code.
105 * The vector is placed in the mount structure so that we can
106 * minimize the number of memory indirections involved.
107 */
108
109 typedef int (*xfs_dio_write_t)(struct xfs_dio *);
110 typedef int (*xfs_dio_read_t)(struct xfs_dio *);
111 typedef int (*xfs_strat_write_t)(struct xfs_iocore *, struct xfs_buf *);
112 typedef int (*xfs_bmapi_t)(struct xfs_trans *, void *,
113 xfs_fileoff_t, xfs_filblks_t, int,
114 xfs_fsblock_t *, xfs_extlen_t,
115 struct xfs_bmbt_irec *, int *,
116 struct xfs_bmap_free *);
117 typedef int (*xfs_bmap_eof_t)(void *, xfs_fileoff_t, int, int *);
118 typedef int (*xfs_rsync_t)(void *, int, xfs_off_t, xfs_off_t);
119 typedef uint (*xfs_lck_map_shared_t)(void *);
120 typedef void (*xfs_lock_t)(void *, uint);
121 typedef void (*xfs_lock_demote_t)(void *, uint);
122 typedef int (*xfs_lock_nowait_t)(void *, uint);
123 typedef void (*xfs_unlk_t)(void *, unsigned int);
124 typedef void (*xfs_chgtime_t)(void *, int);
125 typedef xfs_fsize_t (*xfs_size_t)(void *);
126 typedef xfs_fsize_t (*xfs_setsize_t)(void *, xfs_off_t);
127 typedef xfs_fsize_t (*xfs_lastbyte_t)(void *);
128
129 #ifdef CELL_CAPABLE
130 typedef int (*xfs_checklock_t)(bhv_desc_t *, struct vnode *,
131 int, off_t, off_t, int, struct cred *,
132 struct flid *, vrwlock_t, int);
133 #endif
134
135 typedef struct xfs_ioops {
136 xfs_dio_write_t xfs_dio_write_func;
137 xfs_dio_read_t xfs_dio_read_func;
138 xfs_strat_write_t xfs_strat_write_func;
139 xfs_bmapi_t xfs_bmapi_func;
140 xfs_bmap_eof_t xfs_bmap_eof_func;
141 xfs_rsync_t xfs_rsync_func;
142 xfs_lck_map_shared_t xfs_lck_map_shared;
143 xfs_lock_t xfs_ilock;
144 xfs_lock_demote_t xfs_ilock_demote;
145 xfs_lock_nowait_t xfs_ilock_nowait;
146 xfs_unlk_t xfs_unlock;
147 xfs_chgtime_t xfs_chgtime;
148 xfs_size_t xfs_size_func;
149 xfs_setsize_t xfs_setsize_func;
150 xfs_lastbyte_t xfs_lastbyte;
151 #ifdef CELL_CAPABLE
152 xfs_checklock_t xfs_checklock;
153 #endif
154 } xfs_ioops_t;
155
156
157 #define XFS_DIO_WRITE(mp, diop) \
158 (*(mp)->m_io_ops.xfs_dio_write_func)(diop)
159
160 #define XFS_DIO_READ(mp, diop) \
161 (*(mp)->m_io_ops.xfs_dio_read_func)(diop)
162
163 #define XFS_STRAT_WRITE(mp, io, bp) \
164 (*(mp)->m_io_ops.xfs_strat_write_func)(io, bp)
165
166 #define XFS_BMAPI(mp, trans,io,bno,len,f,first,tot,mval,nmap,flist) \
167 (*(mp)->m_io_ops.xfs_bmapi_func) \
168 (trans,(io)->io_obj,bno,len,f,first,tot,mval,nmap,flist)
169
170 #define XFS_BMAP_EOF(mp, io, endoff, whichfork, eof) \
171 (*(mp)->m_io_ops.xfs_bmap_eof_func) \
172 ((io)->io_obj, endoff, whichfork, eof)
173
174 #define XFS_RSYNC(mp, io, ioflag, start, end) \
175 (*(mp)->m_io_ops.xfs_rsync_func)((io)->io_obj, ioflag, start, end)
176
177 #define XFS_LCK_MAP_SHARED(mp, io) \
178 (*(mp)->m_io_ops.xfs_lck_map_shared)((io)->io_obj)
179
180 #define XFS_UNLK_MAP_SHARED(mp, io, mode) \
181 (*(mp)->m_io_ops.xfs_unlock)((io)->io_obj, mode)
182
183 #define XFS_ILOCK(mp, io, mode) \
184 (*(mp)->m_io_ops.xfs_ilock)((io)->io_obj, mode)
185
186 #define XFS_ILOCK_NOWAIT(mp, io, mode) \
187 (*(mp)->m_io_ops.xfs_ilock_nowait)((io)->io_obj, mode)
188
189 #define XFS_IUNLOCK(mp, io, mode) \
190 (*(mp)->m_io_ops.xfs_unlock)((io)->io_obj, mode)
191
192 #define XFS_ILOCK_DEMOTE(mp, io, mode) \
193 (*(mp)->m_io_ops.xfs_ilock_demote)((io)->io_obj, mode)
194
195 #define XFS_CHGTIME(mp, io, flags) \
196 (*(mp)->m_io_ops.xfs_chgtime)((io)->io_obj, flags)
197
198 #define XFS_SIZE(mp, io) \
199 (*(mp)->m_io_ops.xfs_size_func)((io)->io_obj)
200
201 #define XFS_SETSIZE(mp, io, newsize) \
202 (*(mp)->m_io_ops.xfs_setsize_func)((io)->io_obj, newsize)
203
204 #define XFS_LASTBYTE(mp, io) \
205 (*(mp)->m_io_ops.xfs_lastbyte)((io)->io_obj)
206
207
208 typedef struct xfs_mount {
209 bhv_desc_t m_bhv; /* vfs xfs behavior */
210 xfs_tid_t m_tid; /* next unused tid for fs */
211 AIL_LOCK_T m_ail_lock; /* fs AIL mutex */
212 xfs_ail_entry_t m_ail; /* fs active log item list */
213 uint m_ail_gen; /* fs AIL generation count */
214 xfs_sb_t m_sb; /* copy of fs superblock */
215 lock_t m_sb_lock; /* sb counter mutex */
216 struct xfs_buf *m_sb_bp; /* buffer for superblock */
217 char *m_fsname; /* filesystem name */
218 int m_fsname_len; /* strlen of fs name */
219 int m_bsize; /* fs logical block size */
220 xfs_agnumber_t m_agfrotor; /* last ag where space found */
221 xfs_agnumber_t m_agirotor; /* last ag dir inode alloced */
222 int m_ihsize; /* size of next field */
223 struct xfs_ihash *m_ihash; /* fs private inode hash table*/
224 struct xfs_inode *m_inodes; /* active inode list */
225 mutex_t m_ilock; /* inode list mutex */
226 uint m_ireclaims; /* count of calls to reclaim*/
227 uint m_readio_log; /* min read size log bytes */
228 uint m_readio_blocks; /* min read size blocks */
229 uint m_writeio_log; /* min write size log bytes */
230 uint m_writeio_blocks; /* min write size blocks */
231 void *m_log; /* log specific stuff */
232 int m_logbufs; /* number of log buffers */
233 int m_logbsize; /* size of each log buffer */
234 uint m_rsumlevels; /* rt summary levels */
235 uint m_rsumsize; /* size of rt summary, bytes */
236 struct xfs_inode *m_rbmip; /* pointer to bitmap inode */
237 struct xfs_inode *m_rsumip; /* pointer to summary inode */
238 struct xfs_inode *m_rootip; /* pointer to root directory */
239 struct xfs_quotainfo *m_quotainfo; /* disk quota information */
240 buftarg_t m_ddev_targ; /* ptr to data device */
241 buftarg_t m_logdev_targ; /* ptr to log device */
242 buftarg_t m_rtdev_targ; /* ptr to rt device */
243 buftarg_t *m_ddev_targp; /* saves taking the address */
244 #define m_dev m_ddev_targ.dev
245 #define m_logdev m_logdev_targ.dev
246 #define m_rtdev m_rtdev_targ.dev
247 __uint8_t m_dircook_elog; /* log d-cookie entry bits */
248 __uint8_t m_blkbit_log; /* blocklog + NBBY */
249 __uint8_t m_blkbb_log; /* blocklog - BBSHIFT */
250 __uint8_t m_agno_log; /* log #ag's */
251 __uint8_t m_agino_log; /* #bits for agino in inum */
252 __uint8_t m_nreadaheads; /* #readahead buffers */
253 __uint16_t m_inode_cluster_size;/* min inode buf size */
254 uint m_blockmask; /* sb_blocksize-1 */
255 uint m_blockwsize; /* sb_blocksize in words */
256 uint m_blockwmask; /* blockwsize-1 */
257 uint m_alloc_mxr[2]; /* XFS_ALLOC_BLOCK_MAXRECS */
258 uint m_alloc_mnr[2]; /* XFS_ALLOC_BLOCK_MINRECS */
259 uint m_bmap_dmxr[2]; /* XFS_BMAP_BLOCK_DMAXRECS */
260 uint m_bmap_dmnr[2]; /* XFS_BMAP_BLOCK_DMINRECS */
261 uint m_inobt_mxr[2]; /* XFS_INOBT_BLOCK_MAXRECS */
262 uint m_inobt_mnr[2]; /* XFS_INOBT_BLOCK_MINRECS */
263 uint m_ag_maxlevels; /* XFS_AG_MAXLEVELS */
264 uint m_bm_maxlevels[2]; /* XFS_BM_MAXLEVELS */
265 uint m_in_maxlevels; /* XFS_IN_MAXLEVELS */
266 struct xfs_perag *m_perag; /* per-ag accounting info */
267 mrlock_t m_peraglock; /* lock for m_perag (pointer) */
268 sema_t m_growlock; /* growfs mutex */
269 int m_fixedfsid[2]; /* unchanged for life of FS */
270 uint m_dmevmask; /* DMI events for this FS */
271 uint m_flags; /* global mount flags */
272 uint m_attroffset; /* inode attribute offset */
273 int m_da_node_ents; /* how many entries in danode */
274 int m_ialloc_inos; /* inodes in inode allocation */
275 int m_ialloc_blks; /* blocks in inode allocation */
276 int m_litino; /* size of inode union area */
277 int m_inoalign_mask;/* mask sb_inoalignmt if used */
278 uint m_qflags; /* quota status flags */
279 xfs_trans_reservations_t m_reservations;/* precomputed res values */
280 __uint64_t m_maxicount; /* maximum inode count */
281 __uint64_t m_resblks; /* total reserved blocks */
282 __uint64_t m_resblks_avail;/* available reserved blocks */
283 #if XFS_BIG_FILESYSTEMS
284 xfs_ino_t m_inoadd; /* add value for ino64_offset */
285 #endif
286 int m_dalign; /* stripe unit */
287 int m_swidth; /* stripe width */
288 int m_sinoalign; /* stripe unit inode alignmnt */
289 int m_attr_magicpct;/* 37% of the blocksize */
290 int m_dir_magicpct; /* 37% of the dir blocksize */
291 __uint8_t m_mk_sharedro; /* mark shared ro on unmount */
292 __uint8_t m_inode_quiesce;/* call quiesce on new inodes.
293 field governed by m_ilock */
294 __uint8_t m_dirversion; /* 1 or 2 */
295 xfs_dirops_t m_dirops; /* table of dir funcs */
296 int m_dirblksize; /* directory block sz--bytes */
297 int m_dirblkfsbs; /* directory block sz--fsbs */
298 xfs_dablk_t m_dirdatablk; /* blockno of dir data v2 */
299 xfs_dablk_t m_dirleafblk; /* blockno of dir non-data v2 */
300 xfs_dablk_t m_dirfreeblk; /* blockno of dirfreeindex v2 */
301 int m_chsize; /* size of next field */
302 struct xfs_chash *m_chash; /* fs private inode per-cluster
303 * hash table */
304 struct xfs_ioops m_io_ops; /* vector of I/O ops */
305 struct xfs_expinfo *m_expinfo; /* info to export to other
306 cells. */
307 uint64_t m_shadow_pinmask;
308 /* which bits matter in rpc
309 log item pin masks */
310 uint m_cxfstype; /* mounted shared, etc. */
311 } xfs_mount_t;
312
313 /*
314 * Flags for m_flags.
315 */
316 #define XFS_MOUNT_WSYNC 0x00000001 /* for nfs - all metadata ops
317 must be synchronous except
318 for space allocations */
319 #if XFS_BIG_FILESYSTEMS
320 #define XFS_MOUNT_INO64 0x00000002
321 #endif
322 #define XFS_MOUNT_ROOTQCHECK 0x00000004
323 /* 0x00000008 -- currently unused */
324 #define XFS_MOUNT_FS_SHUTDOWN 0x00000010 /* atomic stop of all filesystem
325 operations, typically for
326 disk errors in metadata */
327 #define XFS_MOUNT_NOATIME 0x00000020 /* don't modify inode access
328 times on reads */
329 #define XFS_MOUNT_RETERR 0x00000040 /* return alignment errors to
330 user */
331 #define XFS_MOUNT_NOALIGN 0x00000080 /* turn off stripe alignment
332 allocations */
333 /* 0x00000100 -- currently unused */
334 #define XFS_MOUNT_REGISTERED 0x00000200 /* registered with cxfs master
335 cell logic */
336 #define XFS_MOUNT_NORECOVERY 0x00000400 /* no recovery - dirty fs */
337 #define XFS_MOUNT_SHARED 0x00000800 /* shared mount */
338 #define XFS_MOUNT_DFLT_IOSIZE 0x00001000 /* set default i/o size */
339 #define XFS_MOUNT_OSYNCISDSYNC 0x00002000 /* treat o_sync like o_dsync */
340
341 /*
342 * Flags for m_cxfstype
343 */
344 #define XFS_CXFS_NOT 0x00000001 /* local mount */
345 #define XFS_CXFS_SERVER 0x00000002 /* we're the CXFS server */
346 #define XFS_CXFS_CLIENT 0x00000004 /* We're a CXFS client */
347 #define XFS_CXFS_REC_ENABLED 0x00000008 /* recovery is enabled */
348
349 #define XFS_FORCED_SHUTDOWN(mp) ((mp)->m_flags & XFS_MOUNT_FS_SHUTDOWN)
350
351 /*
352 * Default minimum read and write sizes.
353 */
354 #define XFS_READIO_LOG_SMALL 15 /* <= 32MB memory */
355 #define XFS_WRITEIO_LOG_SMALL 15
356 #define XFS_READIO_LOG_LARGE 16 /* > 32MB memory */
357 #define XFS_WRITEIO_LOG_LARGE 16
358
359 /*
360 * max and min values for UIO and mount-option defined I/O sizes
361 * min value can't be less than a page. Lower limit for 4K machines
362 * is 8K because that's what was tested.
363 */
364 #define XFS_MAX_IO_LOG 16 /* 64K */
365
366 #if (_PAGESZ == 16384) || (_PAGESZ == 8192)
367 #define XFS_MIN_IO_LOG 14 /* 16K */
368 #elif _PAGESZ == 4096
369 #define XFS_MIN_IO_LOG 13 /* 8K */
370 #else
371 #error "Unknown page size"
372 #endif
373
374
375 /*
376 * Synchronous read and write sizes. This should be
377 * better for NFSv2 wsync filesystems.
378 */
379 #define XFS_WSYNC_READIO_LOG 15 /* 32K */
380 #define XFS_WSYNC_WRITEIO_LOG 14 /* 16K */
381
382 /*
383 * Flags sent to xfs_force_shutdown.
384 */
385 #define XFS_METADATA_IO_ERROR 0x1
386 #define XFS_LOG_IO_ERROR 0x2
387 #define XFS_FORCE_UMOUNT 0x4
388 #define XFS_CORRUPT_INCORE 0x8 /* corrupt in-memory data structures */
389 #if CELL_CAPABLE
390 #define XFS_SHUTDOWN_REMOTE_REQ 0x10 /* shutdown req came from remote cell */
391 #endif
392
393 /*
394 * xflags for xfs_syncsub
395 */
396 #define XFS_XSYNC_RELOC 0x01
397
398 /*
399 * Flags for xfs_mountfs
400 */
401 #define XFS_MFSI_SECOND 0x01 /* Is a cxfs secondary mount -- skip */
402 /* stuff which should only be done */
403 /* once. */
404 #define XFS_MFSI_CLIENT 0x02 /* Is a client -- skip lots of stuff */
405 #define XFS_MFSI_NOUNLINK 0x08 /* Skip unlinked inode processing in */
406 /* log recovery */
407
408 /*
409 * Macros for getting from mount to vfs and back.
410 */
411 #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MTOVFS)
412 struct vfs *xfs_mtovfs(xfs_mount_t *mp);
413 #define XFS_MTOVFS(mp) xfs_mtovfs(mp)
414 #else
415 #define XFS_MTOVFS(mp) (bhvtovfs(&(mp)->m_bhv))
416 #endif
417 #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BHVTOM)
418 xfs_mount_t *xfs_bhvtom(bhv_desc_t *bdp);
419 #define XFS_BHVTOM(bdp) xfs_bhvtom(bdp)
420 #else
421 #define XFS_BHVTOM(bdp) ((xfs_mount_t *)BHV_PDATA(bdp))
422 #endif
423
424
425 /*
426 * Moved here from xfs_ag.h to avoid reordering header files
427 */
428
429 #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DADDR_TO_AGNO)
430 xfs_agnumber_t xfs_daddr_to_agno(struct xfs_mount *mp, xfs_daddr_t d);
431 #define XFS_DADDR_TO_AGNO(mp,d) xfs_daddr_to_agno(mp,d)
432 #else
433
434 static inline xfs_agnumber_t XFS_DADDR_TO_AGNO(xfs_mount_t *mp, xfs_daddr_t d)
435 {
436 d = XFS_BB_TO_FSBT(mp, d);
437 do_div(d, mp->m_sb.sb_agblocks);
438 return (xfs_agnumber_t) d;
439 }
440
441 #endif
442 #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DADDR_TO_AGBNO)
443 xfs_agblock_t xfs_daddr_to_agbno(struct xfs_mount *mp, xfs_daddr_t d);
444 #define XFS_DADDR_TO_AGBNO(mp,d) xfs_daddr_to_agbno(mp,d)
445 #else
446
447 static inline xfs_agblock_t XFS_DADDR_TO_AGBNO(xfs_mount_t *mp, xfs_daddr_t d)
448 {
449 d = XFS_BB_TO_FSBT(mp, d);
450 return (xfs_agblock_t) do_div(d, mp->m_sb.sb_agblocks);
451 }
452
453 #endif
454
455 /*
456 * This structure is for use by the xfs_mod_incore_sb_batch() routine.
457 */
458 typedef struct xfs_mod_sb {
459 xfs_sb_field_t msb_field; /* Field to modify, see below */
460 int msb_delta; /* change to make to the specified field */
461 } xfs_mod_sb_t;
462
463 #define XFS_MOUNT_ILOCK(mp) mutex_lock(&((mp)->m_ilock), PINOD)
464 #define XFS_MOUNT_IUNLOCK(mp) mutex_unlock(&((mp)->m_ilock))
465 #define XFS_SB_LOCK(mp) mutex_spinlock(&(mp)->m_sb_lock)
466 #define XFS_SB_UNLOCK(mp,s) mutex_spinunlock(&(mp)->m_sb_lock,(s))
467
468 void xfs_mod_sb(xfs_trans_t *, __int64_t);
469 xfs_mount_t *xfs_mount_init(void);
470 void xfs_mount_free(xfs_mount_t *mp, int remove_bhv);
471 int xfs_mountfs(struct vfs *, xfs_mount_t *mp, dev_t, int);
472 int xfs_mountargs(struct mounta *, struct xfs_args *);
473
474 int xfs_unmountfs(xfs_mount_t *, int, struct cred *);
475 void xfs_unmountfs_close(xfs_mount_t *, int, struct cred *);
476 int xfs_unmountfs_writesb(xfs_mount_t *);
477 int xfs_unmount_flush(xfs_mount_t *, int);
478 int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int, int);
479 int xfs_mod_incore_sb_batch(xfs_mount_t *, xfs_mod_sb_t *, uint, int);
480 int xfs_readsb(xfs_mount_t *mp, dev_t);
481 struct xfs_buf *xfs_getsb(xfs_mount_t *, int);
482 void xfs_freesb(xfs_mount_t *);
483 void xfs_force_shutdown(struct xfs_mount *, int);
484 int xfs_syncsub(xfs_mount_t *, int, int, int *);
485 void xfs_xlatesb(void *, struct xfs_sb *, int, xfs_arch_t, __int64_t);
486 extern struct vfsops xfs_vfsops;
487
488 #endif /* __KERNEL__ */
489
490 #endif /* __XFS_MOUNT_H__ */