diff options
Diffstat (limited to 'fs/xfs/xfs_mount.h')
| -rw-r--r-- | fs/xfs/xfs_mount.h | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 1df7e4502967..4fa0bc7b983e 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
| @@ -78,7 +78,8 @@ typedef int (*xfs_send_destroy_t)(struct xfs_inode *, dm_right_t); | |||
| 78 | typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct xfs_mount *, | 78 | typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct xfs_mount *, |
| 79 | struct xfs_inode *, dm_right_t, | 79 | struct xfs_inode *, dm_right_t, |
| 80 | struct xfs_inode *, dm_right_t, | 80 | struct xfs_inode *, dm_right_t, |
| 81 | const char *, const char *, mode_t, int, int); | 81 | const unsigned char *, const unsigned char *, |
| 82 | mode_t, int, int); | ||
| 82 | typedef int (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t, | 83 | typedef int (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t, |
| 83 | char *, char *); | 84 | char *, char *); |
| 84 | typedef void (*xfs_send_unmount_t)(struct xfs_mount *, struct xfs_inode *, | 85 | typedef void (*xfs_send_unmount_t)(struct xfs_mount *, struct xfs_inode *, |
| @@ -207,8 +208,8 @@ typedef struct xfs_mount { | |||
| 207 | uint m_ag_maxlevels; /* XFS_AG_MAXLEVELS */ | 208 | uint m_ag_maxlevels; /* XFS_AG_MAXLEVELS */ |
| 208 | uint m_bm_maxlevels[2]; /* XFS_BM_MAXLEVELS */ | 209 | uint m_bm_maxlevels[2]; /* XFS_BM_MAXLEVELS */ |
| 209 | uint m_in_maxlevels; /* max inobt btree levels. */ | 210 | uint m_in_maxlevels; /* max inobt btree levels. */ |
| 210 | struct xfs_perag *m_perag; /* per-ag accounting info */ | 211 | struct radix_tree_root m_perag_tree; /* per-ag accounting info */ |
| 211 | struct rw_semaphore m_peraglock; /* lock for m_perag (pointer) */ | 212 | spinlock_t m_perag_lock; /* lock for m_perag_tree */ |
| 212 | struct mutex m_growlock; /* growfs mutex */ | 213 | struct mutex m_growlock; /* growfs mutex */ |
| 213 | int m_fixedfsid[2]; /* unchanged for life of FS */ | 214 | int m_fixedfsid[2]; /* unchanged for life of FS */ |
| 214 | uint m_dmevmask; /* DMI events for this FS */ | 215 | uint m_dmevmask; /* DMI events for this FS */ |
| @@ -224,6 +225,7 @@ typedef struct xfs_mount { | |||
| 224 | __uint64_t m_maxioffset; /* maximum inode offset */ | 225 | __uint64_t m_maxioffset; /* maximum inode offset */ |
| 225 | __uint64_t m_resblks; /* total reserved blocks */ | 226 | __uint64_t m_resblks; /* total reserved blocks */ |
| 226 | __uint64_t m_resblks_avail;/* available reserved blocks */ | 227 | __uint64_t m_resblks_avail;/* available reserved blocks */ |
| 228 | __uint64_t m_resblks_save; /* reserved blks @ remount,ro */ | ||
| 227 | int m_dalign; /* stripe unit */ | 229 | int m_dalign; /* stripe unit */ |
| 228 | int m_swidth; /* stripe width */ | 230 | int m_swidth; /* stripe width */ |
| 229 | int m_sinoalign; /* stripe unit inode alignment */ | 231 | int m_sinoalign; /* stripe unit inode alignment */ |
| @@ -243,7 +245,7 @@ typedef struct xfs_mount { | |||
| 243 | struct xfs_qmops *m_qm_ops; /* vector of XQM ops */ | 245 | struct xfs_qmops *m_qm_ops; /* vector of XQM ops */ |
| 244 | atomic_t m_active_trans; /* number trans frozen */ | 246 | atomic_t m_active_trans; /* number trans frozen */ |
| 245 | #ifdef HAVE_PERCPU_SB | 247 | #ifdef HAVE_PERCPU_SB |
| 246 | xfs_icsb_cnts_t *m_sb_cnts; /* per-cpu superblock counters */ | 248 | xfs_icsb_cnts_t __percpu *m_sb_cnts; /* per-cpu superblock counters */ |
| 247 | unsigned long m_icsb_counters; /* disabled per-cpu counters */ | 249 | unsigned long m_icsb_counters; /* disabled per-cpu counters */ |
| 248 | struct notifier_block m_icsb_notifier; /* hotplug cpu notifier */ | 250 | struct notifier_block m_icsb_notifier; /* hotplug cpu notifier */ |
| 249 | struct mutex m_icsb_mutex; /* balancer sync lock */ | 251 | struct mutex m_icsb_mutex; /* balancer sync lock */ |
| @@ -384,19 +386,10 @@ xfs_daddr_to_agbno(struct xfs_mount *mp, xfs_daddr_t d) | |||
| 384 | } | 386 | } |
| 385 | 387 | ||
| 386 | /* | 388 | /* |
| 387 | * perag get/put wrappers for eventual ref counting | 389 | * perag get/put wrappers for ref counting |
| 388 | */ | 390 | */ |
| 389 | static inline xfs_perag_t * | 391 | struct xfs_perag *xfs_perag_get(struct xfs_mount *mp, xfs_agnumber_t agno); |
| 390 | xfs_get_perag(struct xfs_mount *mp, xfs_ino_t ino) | 392 | void xfs_perag_put(struct xfs_perag *pag); |
| 391 | { | ||
| 392 | return &mp->m_perag[XFS_INO_TO_AGNO(mp, ino)]; | ||
| 393 | } | ||
| 394 | |||
| 395 | static inline void | ||
| 396 | xfs_put_perag(struct xfs_mount *mp, xfs_perag_t *pag) | ||
| 397 | { | ||
| 398 | /* nothing to see here, move along */ | ||
| 399 | } | ||
| 400 | 393 | ||
| 401 | /* | 394 | /* |
| 402 | * Per-cpu superblock locking functions | 395 | * Per-cpu superblock locking functions |
| @@ -428,6 +421,7 @@ typedef struct xfs_mod_sb { | |||
| 428 | } xfs_mod_sb_t; | 421 | } xfs_mod_sb_t; |
| 429 | 422 | ||
| 430 | extern int xfs_log_sbcount(xfs_mount_t *, uint); | 423 | extern int xfs_log_sbcount(xfs_mount_t *, uint); |
| 424 | extern __uint64_t xfs_default_resblks(xfs_mount_t *mp); | ||
| 431 | extern int xfs_mountfs(xfs_mount_t *mp); | 425 | extern int xfs_mountfs(xfs_mount_t *mp); |
| 432 | 426 | ||
| 433 | extern void xfs_unmountfs(xfs_mount_t *); | 427 | extern void xfs_unmountfs(xfs_mount_t *); |
| @@ -442,6 +436,8 @@ extern void xfs_freesb(xfs_mount_t *); | |||
| 442 | extern int xfs_fs_writable(xfs_mount_t *); | 436 | extern int xfs_fs_writable(xfs_mount_t *); |
| 443 | extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t); | 437 | extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t); |
| 444 | 438 | ||
| 439 | extern int xfs_dev_is_read_only(struct xfs_mount *, char *); | ||
| 440 | |||
| 445 | extern int xfs_dmops_get(struct xfs_mount *); | 441 | extern int xfs_dmops_get(struct xfs_mount *); |
| 446 | extern void xfs_dmops_put(struct xfs_mount *); | 442 | extern void xfs_dmops_put(struct xfs_mount *); |
| 447 | 443 | ||
| @@ -450,7 +446,8 @@ extern struct xfs_dmops xfs_dmcore_xfs; | |||
| 450 | #endif /* __KERNEL__ */ | 446 | #endif /* __KERNEL__ */ |
| 451 | 447 | ||
| 452 | extern void xfs_mod_sb(struct xfs_trans *, __int64_t); | 448 | extern void xfs_mod_sb(struct xfs_trans *, __int64_t); |
| 453 | extern xfs_agnumber_t xfs_initialize_perag(struct xfs_mount *, xfs_agnumber_t); | 449 | extern int xfs_initialize_perag(struct xfs_mount *, xfs_agnumber_t, |
| 450 | xfs_agnumber_t *); | ||
| 454 | extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *); | 451 | extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *); |
| 455 | extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t); | 452 | extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t); |
| 456 | 453 | ||
