diff options
Diffstat (limited to 'fs/xfs/xfs_mount.h')
-rw-r--r-- | fs/xfs/xfs_mount.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index f8a68a2319b5..cfa7a5d22e72 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
@@ -207,8 +207,8 @@ typedef struct xfs_mount { | |||
207 | uint m_ag_maxlevels; /* XFS_AG_MAXLEVELS */ | 207 | uint m_ag_maxlevels; /* XFS_AG_MAXLEVELS */ |
208 | uint m_bm_maxlevels[2]; /* XFS_BM_MAXLEVELS */ | 208 | uint m_bm_maxlevels[2]; /* XFS_BM_MAXLEVELS */ |
209 | uint m_in_maxlevels; /* max inobt btree levels. */ | 209 | uint m_in_maxlevels; /* max inobt btree levels. */ |
210 | struct xfs_perag *m_perag; /* per-ag accounting info */ | 210 | struct radix_tree_root m_perag_tree; /* per-ag accounting info */ |
211 | struct rw_semaphore m_peraglock; /* lock for m_perag (pointer) */ | 211 | spinlock_t m_perag_lock; /* lock for m_perag_tree */ |
212 | struct mutex m_growlock; /* growfs mutex */ | 212 | struct mutex m_growlock; /* growfs mutex */ |
213 | int m_fixedfsid[2]; /* unchanged for life of FS */ | 213 | int m_fixedfsid[2]; /* unchanged for life of FS */ |
214 | uint m_dmevmask; /* DMI events for this FS */ | 214 | uint m_dmevmask; /* DMI events for this FS */ |
@@ -389,7 +389,12 @@ xfs_daddr_to_agbno(struct xfs_mount *mp, xfs_daddr_t d) | |||
389 | static inline struct xfs_perag * | 389 | static inline struct xfs_perag * |
390 | xfs_perag_get(struct xfs_mount *mp, xfs_agnumber_t agno) | 390 | xfs_perag_get(struct xfs_mount *mp, xfs_agnumber_t agno) |
391 | { | 391 | { |
392 | return &mp->m_perag[agno]; | 392 | struct xfs_perag *pag; |
393 | |||
394 | spin_lock(&mp->m_perag_lock); | ||
395 | pag = radix_tree_lookup(&mp->m_perag_tree, agno); | ||
396 | spin_unlock(&mp->m_perag_lock); | ||
397 | return pag; | ||
393 | } | 398 | } |
394 | 399 | ||
395 | static inline void | 400 | static inline void |
@@ -450,7 +455,8 @@ extern struct xfs_dmops xfs_dmcore_xfs; | |||
450 | #endif /* __KERNEL__ */ | 455 | #endif /* __KERNEL__ */ |
451 | 456 | ||
452 | extern void xfs_mod_sb(struct xfs_trans *, __int64_t); | 457 | extern void xfs_mod_sb(struct xfs_trans *, __int64_t); |
453 | extern xfs_agnumber_t xfs_initialize_perag(struct xfs_mount *, xfs_agnumber_t); | 458 | extern int xfs_initialize_perag(struct xfs_mount *, xfs_agnumber_t, |
459 | xfs_agnumber_t *); | ||
454 | extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *); | 460 | 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); | 461 | extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t); |
456 | 462 | ||