aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_mount.h')
-rw-r--r--fs/xfs/xfs_mount.h44
1 files changed, 37 insertions, 7 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index cd3cf9613a00..ebd73960e9db 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -267,6 +267,34 @@ typedef struct xfs_ioops {
267#define XFS_IODONE(vfsp) \ 267#define XFS_IODONE(vfsp) \
268 (*(mp)->m_io_ops.xfs_iodone)(vfsp) 268 (*(mp)->m_io_ops.xfs_iodone)(vfsp)
269 269
270#ifdef HAVE_PERCPU_SB
271
272/*
273 * Valid per-cpu incore superblock counters. Note that if you add new counters,
274 * you may need to define new counter disabled bit field descriptors as there
275 * are more possible fields in the superblock that can fit in a bitfield on a
276 * 32 bit platform. The XFS_SBS_* values for the current current counters just
277 * fit.
278 */
279typedef struct xfs_icsb_cnts {
280 uint64_t icsb_fdblocks;
281 uint64_t icsb_ifree;
282 uint64_t icsb_icount;
283 unsigned long icsb_flags;
284} xfs_icsb_cnts_t;
285
286#define XFS_ICSB_FLAG_LOCK (1 << 0) /* counter lock bit */
287
288#define XFS_ICSB_SB_LOCKED (1 << 0) /* sb already locked */
289#define XFS_ICSB_LAZY_COUNT (1 << 1) /* accuracy not needed */
290
291extern int xfs_icsb_init_counters(struct xfs_mount *);
292extern void xfs_icsb_sync_counters_lazy(struct xfs_mount *);
293
294#else
295#define xfs_icsb_init_counters(mp) (0)
296#define xfs_icsb_sync_counters_lazy(mp) do { } while (0)
297#endif
270 298
271typedef struct xfs_mount { 299typedef struct xfs_mount {
272 bhv_desc_t m_bhv; /* vfs xfs behavior */ 300 bhv_desc_t m_bhv; /* vfs xfs behavior */
@@ -372,6 +400,11 @@ typedef struct xfs_mount {
372 struct xfs_qmops m_qm_ops; /* vector of XQM ops */ 400 struct xfs_qmops m_qm_ops; /* vector of XQM ops */
373 struct xfs_ioops m_io_ops; /* vector of I/O ops */ 401 struct xfs_ioops m_io_ops; /* vector of I/O ops */
374 atomic_t m_active_trans; /* number trans frozen */ 402 atomic_t m_active_trans; /* number trans frozen */
403#ifdef HAVE_PERCPU_SB
404 xfs_icsb_cnts_t *m_sb_cnts; /* per-cpu superblock counters */
405 unsigned long m_icsb_counters; /* disabled per-cpu counters */
406 struct notifier_block m_icsb_notifier; /* hotplug cpu notifier */
407#endif
375} xfs_mount_t; 408} xfs_mount_t;
376 409
377/* 410/*
@@ -386,8 +419,6 @@ typedef struct xfs_mount {
386#define XFS_MOUNT_FS_SHUTDOWN (1ULL << 4) /* atomic stop of all filesystem 419#define XFS_MOUNT_FS_SHUTDOWN (1ULL << 4) /* atomic stop of all filesystem
387 operations, typically for 420 operations, typically for
388 disk errors in metadata */ 421 disk errors in metadata */
389#define XFS_MOUNT_NOATIME (1ULL << 5) /* don't modify inode access
390 times on reads */
391#define XFS_MOUNT_RETERR (1ULL << 6) /* return alignment errors to 422#define XFS_MOUNT_RETERR (1ULL << 6) /* return alignment errors to
392 user */ 423 user */
393#define XFS_MOUNT_NOALIGN (1ULL << 7) /* turn off stripe alignment 424#define XFS_MOUNT_NOALIGN (1ULL << 7) /* turn off stripe alignment
@@ -411,6 +442,8 @@ typedef struct xfs_mount {
411#define XFS_MOUNT_DIRSYNC (1ULL << 21) /* synchronous directory ops */ 442#define XFS_MOUNT_DIRSYNC (1ULL << 21) /* synchronous directory ops */
412#define XFS_MOUNT_COMPAT_IOSIZE (1ULL << 22) /* don't report large preferred 443#define XFS_MOUNT_COMPAT_IOSIZE (1ULL << 22) /* don't report large preferred
413 * I/O size in stat() */ 444 * I/O size in stat() */
445#define XFS_MOUNT_NO_PERCPU_SB (1ULL << 23) /* don't use per-cpu superblock
446 counters */
414 447
415 448
416/* 449/*
@@ -473,11 +506,6 @@ xfs_preferred_iosize(xfs_mount_t *mp)
473#define XFS_SHUTDOWN_REMOTE_REQ 0x10 /* Shutdown came from remote cell */ 506#define XFS_SHUTDOWN_REMOTE_REQ 0x10 /* Shutdown came from remote cell */
474 507
475/* 508/*
476 * xflags for xfs_syncsub
477 */
478#define XFS_XSYNC_RELOC 0x01
479
480/*
481 * Flags for xfs_mountfs 509 * Flags for xfs_mountfs
482 */ 510 */
483#define XFS_MFSI_SECOND 0x01 /* Secondary mount -- skip stuff */ 511#define XFS_MFSI_SECOND 0x01 /* Secondary mount -- skip stuff */
@@ -548,6 +576,8 @@ extern void xfs_unmountfs_close(xfs_mount_t *, struct cred *);
548extern int xfs_unmountfs_writesb(xfs_mount_t *); 576extern int xfs_unmountfs_writesb(xfs_mount_t *);
549extern int xfs_unmount_flush(xfs_mount_t *, int); 577extern int xfs_unmount_flush(xfs_mount_t *, int);
550extern int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int, int); 578extern int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int, int);
579extern int xfs_mod_incore_sb_unlocked(xfs_mount_t *, xfs_sb_field_t,
580 int, int);
551extern int xfs_mod_incore_sb_batch(xfs_mount_t *, xfs_mod_sb_t *, 581extern int xfs_mod_incore_sb_batch(xfs_mount_t *, xfs_mod_sb_t *,
552 uint, int); 582 uint, int);
553extern struct xfs_buf *xfs_getsb(xfs_mount_t *, int); 583extern struct xfs_buf *xfs_getsb(xfs_mount_t *, int);