diff options
author | Niv Sardi <xaiki@debian.org> | 2008-11-06 23:07:12 -0500 |
---|---|---|
committer | Niv Sardi <xaiki@debian.org> | 2008-11-06 23:07:12 -0500 |
commit | dcd7b4e5c0649b1d2219399529b20de1df517e55 (patch) | |
tree | ef00739e48ddda0a30061d62a7348ed4b0c9aeeb /fs/xfs/xfs_mount.h | |
parent | 75fa67706cce5272bcfc51ed646f2da21f3bdb6e (diff) | |
parent | 91b777125175077fb74025608dba87f100586c62 (diff) |
Merge branch 'master' of git://oss.sgi.com:8090/xfs/linux-2.6
Diffstat (limited to 'fs/xfs/xfs_mount.h')
-rw-r--r-- | fs/xfs/xfs_mount.h | 54 |
1 files changed, 21 insertions, 33 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index f3c1024b1241..e3f618c84e47 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #ifndef __XFS_MOUNT_H__ | 18 | #ifndef __XFS_MOUNT_H__ |
19 | #define __XFS_MOUNT_H__ | 19 | #define __XFS_MOUNT_H__ |
20 | 20 | ||
21 | #include "xfs_sync.h" | ||
21 | 22 | ||
22 | typedef struct xfs_trans_reservations { | 23 | typedef struct xfs_trans_reservations { |
23 | uint tr_write; /* extent alloc trans */ | 24 | uint tr_write; /* extent alloc trans */ |
@@ -44,14 +45,14 @@ typedef struct xfs_trans_reservations { | |||
44 | } xfs_trans_reservations_t; | 45 | } xfs_trans_reservations_t; |
45 | 46 | ||
46 | #ifndef __KERNEL__ | 47 | #ifndef __KERNEL__ |
47 | /* | 48 | |
48 | * Moved here from xfs_ag.h to avoid reordering header files | ||
49 | */ | ||
50 | #define XFS_DADDR_TO_AGNO(mp,d) \ | 49 | #define XFS_DADDR_TO_AGNO(mp,d) \ |
51 | ((xfs_agnumber_t)(XFS_BB_TO_FSBT(mp, d) / (mp)->m_sb.sb_agblocks)) | 50 | ((xfs_agnumber_t)(XFS_BB_TO_FSBT(mp, d) / (mp)->m_sb.sb_agblocks)) |
52 | #define XFS_DADDR_TO_AGBNO(mp,d) \ | 51 | #define XFS_DADDR_TO_AGBNO(mp,d) \ |
53 | ((xfs_agblock_t)(XFS_BB_TO_FSBT(mp, d) % (mp)->m_sb.sb_agblocks)) | 52 | ((xfs_agblock_t)(XFS_BB_TO_FSBT(mp, d) % (mp)->m_sb.sb_agblocks)) |
54 | #else | 53 | |
54 | #else /* __KERNEL__ */ | ||
55 | |||
55 | struct cred; | 56 | struct cred; |
56 | struct log; | 57 | struct log; |
57 | struct xfs_mount_args; | 58 | struct xfs_mount_args; |
@@ -62,6 +63,7 @@ struct xfs_extdelta; | |||
62 | struct xfs_swapext; | 63 | struct xfs_swapext; |
63 | struct xfs_mru_cache; | 64 | struct xfs_mru_cache; |
64 | struct xfs_nameops; | 65 | struct xfs_nameops; |
66 | struct xfs_ail; | ||
65 | 67 | ||
66 | /* | 68 | /* |
67 | * Prototypes and functions for the Data Migration subsystem. | 69 | * Prototypes and functions for the Data Migration subsystem. |
@@ -223,18 +225,10 @@ extern void xfs_icsb_sync_counters_locked(struct xfs_mount *, int); | |||
223 | #define xfs_icsb_sync_counters_locked(mp, flags) do { } while (0) | 225 | #define xfs_icsb_sync_counters_locked(mp, flags) do { } while (0) |
224 | #endif | 226 | #endif |
225 | 227 | ||
226 | typedef struct xfs_ail { | ||
227 | struct list_head xa_ail; | ||
228 | uint xa_gen; | ||
229 | struct task_struct *xa_task; | ||
230 | xfs_lsn_t xa_target; | ||
231 | } xfs_ail_t; | ||
232 | |||
233 | typedef struct xfs_mount { | 228 | typedef struct xfs_mount { |
234 | struct super_block *m_super; | 229 | struct super_block *m_super; |
235 | xfs_tid_t m_tid; /* next unused tid for fs */ | 230 | xfs_tid_t m_tid; /* next unused tid for fs */ |
236 | spinlock_t m_ail_lock; /* fs AIL mutex */ | 231 | struct xfs_ail *m_ail; /* fs active log item list */ |
237 | xfs_ail_t m_ail; /* fs active log item list */ | ||
238 | xfs_sb_t m_sb; /* copy of fs superblock */ | 232 | xfs_sb_t m_sb; /* copy of fs superblock */ |
239 | spinlock_t m_sb_lock; /* sb counter lock */ | 233 | spinlock_t m_sb_lock; /* sb counter lock */ |
240 | struct xfs_buf *m_sb_bp; /* buffer for superblock */ | 234 | struct xfs_buf *m_sb_bp; /* buffer for superblock */ |
@@ -247,9 +241,6 @@ typedef struct xfs_mount { | |||
247 | xfs_agnumber_t m_agirotor; /* last ag dir inode alloced */ | 241 | xfs_agnumber_t m_agirotor; /* last ag dir inode alloced */ |
248 | spinlock_t m_agirotor_lock;/* .. and lock protecting it */ | 242 | spinlock_t m_agirotor_lock;/* .. and lock protecting it */ |
249 | xfs_agnumber_t m_maxagi; /* highest inode alloc group */ | 243 | xfs_agnumber_t m_maxagi; /* highest inode alloc group */ |
250 | struct xfs_inode *m_inodes; /* active inode list */ | ||
251 | struct list_head m_del_inodes; /* inodes to reclaim */ | ||
252 | mutex_t m_ilock; /* inode list mutex */ | ||
253 | uint m_ireclaims; /* count of calls to reclaim*/ | 244 | uint m_ireclaims; /* count of calls to reclaim*/ |
254 | uint m_readio_log; /* min read size log bytes */ | 245 | uint m_readio_log; /* min read size log bytes */ |
255 | uint m_readio_blocks; /* min read size blocks */ | 246 | uint m_readio_blocks; /* min read size blocks */ |
@@ -267,7 +258,6 @@ typedef struct xfs_mount { | |||
267 | xfs_buftarg_t *m_ddev_targp; /* saves taking the address */ | 258 | xfs_buftarg_t *m_ddev_targp; /* saves taking the address */ |
268 | xfs_buftarg_t *m_logdev_targp;/* ptr to log device */ | 259 | xfs_buftarg_t *m_logdev_targp;/* ptr to log device */ |
269 | xfs_buftarg_t *m_rtdev_targp; /* ptr to rt device */ | 260 | xfs_buftarg_t *m_rtdev_targp; /* ptr to rt device */ |
270 | __uint8_t m_dircook_elog; /* log d-cookie entry bits */ | ||
271 | __uint8_t m_blkbit_log; /* blocklog + NBBY */ | 261 | __uint8_t m_blkbit_log; /* blocklog + NBBY */ |
272 | __uint8_t m_blkbb_log; /* blocklog - BBSHIFT */ | 262 | __uint8_t m_blkbb_log; /* blocklog - BBSHIFT */ |
273 | __uint8_t m_agno_log; /* log #ag's */ | 263 | __uint8_t m_agno_log; /* log #ag's */ |
@@ -276,12 +266,12 @@ typedef struct xfs_mount { | |||
276 | uint m_blockmask; /* sb_blocksize-1 */ | 266 | uint m_blockmask; /* sb_blocksize-1 */ |
277 | uint m_blockwsize; /* sb_blocksize in words */ | 267 | uint m_blockwsize; /* sb_blocksize in words */ |
278 | uint m_blockwmask; /* blockwsize-1 */ | 268 | uint m_blockwmask; /* blockwsize-1 */ |
279 | uint m_alloc_mxr[2]; /* XFS_ALLOC_BLOCK_MAXRECS */ | 269 | uint m_alloc_mxr[2]; /* max alloc btree records */ |
280 | uint m_alloc_mnr[2]; /* XFS_ALLOC_BLOCK_MINRECS */ | 270 | uint m_alloc_mnr[2]; /* min alloc btree records */ |
281 | uint m_bmap_dmxr[2]; /* XFS_BMAP_BLOCK_DMAXRECS */ | 271 | uint m_bmap_dmxr[2]; /* max bmap btree records */ |
282 | uint m_bmap_dmnr[2]; /* XFS_BMAP_BLOCK_DMINRECS */ | 272 | uint m_bmap_dmnr[2]; /* min bmap btree records */ |
283 | uint m_inobt_mxr[2]; /* XFS_INOBT_BLOCK_MAXRECS */ | 273 | uint m_inobt_mxr[2]; /* max inobt btree records */ |
284 | uint m_inobt_mnr[2]; /* XFS_INOBT_BLOCK_MINRECS */ | 274 | uint m_inobt_mnr[2]; /* min inobt btree records */ |
285 | uint m_ag_maxlevels; /* XFS_AG_MAXLEVELS */ | 275 | uint m_ag_maxlevels; /* XFS_AG_MAXLEVELS */ |
286 | uint m_bm_maxlevels[2]; /* XFS_BM_MAXLEVELS */ | 276 | uint m_bm_maxlevels[2]; /* XFS_BM_MAXLEVELS */ |
287 | uint m_in_maxlevels; /* XFS_IN_MAXLEVELS */ | 277 | uint m_in_maxlevels; /* XFS_IN_MAXLEVELS */ |
@@ -313,8 +303,7 @@ typedef struct xfs_mount { | |||
313 | int m_attr_magicpct;/* 37% of the blocksize */ | 303 | int m_attr_magicpct;/* 37% of the blocksize */ |
314 | int m_dir_magicpct; /* 37% of the dir blocksize */ | 304 | int m_dir_magicpct; /* 37% of the dir blocksize */ |
315 | __uint8_t m_mk_sharedro; /* mark shared ro on unmount */ | 305 | __uint8_t m_mk_sharedro; /* mark shared ro on unmount */ |
316 | __uint8_t m_inode_quiesce;/* call quiesce on new inodes. | 306 | __uint8_t m_inode_quiesce;/* call quiesce on new inodes. */ |
317 | field governed by m_ilock */ | ||
318 | __uint8_t m_sectbb_log; /* sectlog - BBSHIFT */ | 307 | __uint8_t m_sectbb_log; /* sectlog - BBSHIFT */ |
319 | const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */ | 308 | const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */ |
320 | int m_dirblksize; /* directory block sz--bytes */ | 309 | int m_dirblksize; /* directory block sz--bytes */ |
@@ -508,7 +497,6 @@ typedef struct xfs_mod_sb { | |||
508 | #define XFS_MOUNT_ILOCK(mp) mutex_lock(&((mp)->m_ilock)) | 497 | #define XFS_MOUNT_ILOCK(mp) mutex_lock(&((mp)->m_ilock)) |
509 | #define XFS_MOUNT_IUNLOCK(mp) mutex_unlock(&((mp)->m_ilock)) | 498 | #define XFS_MOUNT_IUNLOCK(mp) mutex_unlock(&((mp)->m_ilock)) |
510 | 499 | ||
511 | extern void xfs_mod_sb(xfs_trans_t *, __int64_t); | ||
512 | extern int xfs_log_sbcount(xfs_mount_t *, uint); | 500 | extern int xfs_log_sbcount(xfs_mount_t *, uint); |
513 | extern int xfs_mountfs(xfs_mount_t *mp); | 501 | extern int xfs_mountfs(xfs_mount_t *mp); |
514 | extern void xfs_mountfs_check_barriers(xfs_mount_t *mp); | 502 | extern void xfs_mountfs_check_barriers(xfs_mount_t *mp); |
@@ -525,20 +513,20 @@ extern struct xfs_buf *xfs_getsb(xfs_mount_t *, int); | |||
525 | extern int xfs_readsb(xfs_mount_t *, int); | 513 | extern int xfs_readsb(xfs_mount_t *, int); |
526 | extern void xfs_freesb(xfs_mount_t *); | 514 | extern void xfs_freesb(xfs_mount_t *); |
527 | extern int xfs_fs_writable(xfs_mount_t *); | 515 | extern int xfs_fs_writable(xfs_mount_t *); |
528 | extern int xfs_syncsub(xfs_mount_t *, int, int *); | ||
529 | extern int xfs_sync_inodes(xfs_mount_t *, int, int *); | ||
530 | extern xfs_agnumber_t xfs_initialize_perag(xfs_mount_t *, xfs_agnumber_t); | ||
531 | extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *); | ||
532 | extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t); | ||
533 | extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t); | 516 | extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t); |
534 | 517 | ||
535 | extern int xfs_dmops_get(struct xfs_mount *, struct xfs_mount_args *); | 518 | extern int xfs_dmops_get(struct xfs_mount *); |
536 | extern void xfs_dmops_put(struct xfs_mount *); | 519 | extern void xfs_dmops_put(struct xfs_mount *); |
537 | extern int xfs_qmops_get(struct xfs_mount *, struct xfs_mount_args *); | 520 | extern int xfs_qmops_get(struct xfs_mount *); |
538 | extern void xfs_qmops_put(struct xfs_mount *); | 521 | extern void xfs_qmops_put(struct xfs_mount *); |
539 | 522 | ||
540 | extern struct xfs_dmops xfs_dmcore_xfs; | 523 | extern struct xfs_dmops xfs_dmcore_xfs; |
541 | 524 | ||
542 | #endif /* __KERNEL__ */ | 525 | #endif /* __KERNEL__ */ |
543 | 526 | ||
527 | extern void xfs_mod_sb(struct xfs_trans *, __int64_t); | ||
528 | extern xfs_agnumber_t xfs_initialize_perag(struct xfs_mount *, xfs_agnumber_t); | ||
529 | extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *); | ||
530 | extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t); | ||
531 | |||
544 | #endif /* __XFS_MOUNT_H__ */ | 532 | #endif /* __XFS_MOUNT_H__ */ |