diff options
author | Dave Jones <davej@redhat.com> | 2006-06-29 16:01:54 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-06-29 16:01:54 -0400 |
commit | 55b4d6a52195a8f277ffddf755ddaff359878f41 (patch) | |
tree | 06a3183a562f8da4688f65023f7a18dcad702956 /fs/xfs/xfs_mount.h | |
parent | adf8a287150667feb5747f8beade62acacc17d4e (diff) | |
parent | 1f1332f727c3229eb2166a83fec5d3de6a73dce2 (diff) |
Merge ../linus
Conflicts:
drivers/char/agp/Kconfig
Diffstat (limited to 'fs/xfs/xfs_mount.h')
-rw-r--r-- | fs/xfs/xfs_mount.h | 70 |
1 files changed, 38 insertions, 32 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 668ad23fd37c..b2bd4be4200a 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
@@ -53,8 +53,8 @@ typedef struct xfs_trans_reservations { | |||
53 | #else | 53 | #else |
54 | struct cred; | 54 | struct cred; |
55 | struct log; | 55 | struct log; |
56 | struct vfs; | 56 | struct bhv_vfs; |
57 | struct vnode; | 57 | struct bhv_vnode; |
58 | struct xfs_mount_args; | 58 | struct xfs_mount_args; |
59 | struct xfs_ihash; | 59 | struct xfs_ihash; |
60 | struct xfs_chash; | 60 | struct xfs_chash; |
@@ -63,9 +63,11 @@ struct xfs_perag; | |||
63 | struct xfs_iocore; | 63 | struct xfs_iocore; |
64 | struct xfs_bmbt_irec; | 64 | struct xfs_bmbt_irec; |
65 | struct xfs_bmap_free; | 65 | struct xfs_bmap_free; |
66 | struct xfs_extdelta; | ||
67 | struct xfs_swapext; | ||
66 | 68 | ||
67 | extern struct vfsops xfs_vfsops; | 69 | extern struct bhv_vfsops xfs_vfsops; |
68 | extern struct vnodeops xfs_vnodeops; | 70 | extern struct bhv_vnodeops xfs_vnodeops; |
69 | 71 | ||
70 | #define AIL_LOCK_T lock_t | 72 | #define AIL_LOCK_T lock_t |
71 | #define AIL_LOCKINIT(x,y) spinlock_init(x,y) | 73 | #define AIL_LOCKINIT(x,y) spinlock_init(x,y) |
@@ -78,15 +80,15 @@ extern struct vnodeops xfs_vnodeops; | |||
78 | * Prototypes and functions for the Data Migration subsystem. | 80 | * Prototypes and functions for the Data Migration subsystem. |
79 | */ | 81 | */ |
80 | 82 | ||
81 | typedef int (*xfs_send_data_t)(int, struct vnode *, | 83 | typedef int (*xfs_send_data_t)(int, struct bhv_vnode *, |
82 | xfs_off_t, size_t, int, vrwlock_t *); | 84 | xfs_off_t, size_t, int, bhv_vrwlock_t *); |
83 | typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint); | 85 | typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint); |
84 | typedef int (*xfs_send_destroy_t)(struct vnode *, dm_right_t); | 86 | typedef int (*xfs_send_destroy_t)(struct bhv_vnode *, dm_right_t); |
85 | typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct vfs *, | 87 | typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct bhv_vfs *, |
86 | struct vnode *, | 88 | struct bhv_vnode *, |
87 | dm_right_t, struct vnode *, dm_right_t, | 89 | dm_right_t, struct bhv_vnode *, dm_right_t, |
88 | char *, char *, mode_t, int, int); | 90 | char *, char *, mode_t, int, int); |
89 | typedef void (*xfs_send_unmount_t)(struct vfs *, struct vnode *, | 91 | typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, struct bhv_vnode *, |
90 | dm_right_t, mode_t, int, int); | 92 | dm_right_t, mode_t, int, int); |
91 | 93 | ||
92 | typedef struct xfs_dmops { | 94 | typedef struct xfs_dmops { |
@@ -188,13 +190,18 @@ typedef struct xfs_qmops { | |||
188 | * Prototypes and functions for I/O core modularization. | 190 | * Prototypes and functions for I/O core modularization. |
189 | */ | 191 | */ |
190 | 192 | ||
191 | typedef int (*xfs_ioinit_t)(struct vfs *, | 193 | typedef int (*xfs_ioinit_t)(struct bhv_vfs *, |
192 | struct xfs_mount_args *, int); | 194 | struct xfs_mount_args *, int); |
193 | typedef int (*xfs_bmapi_t)(struct xfs_trans *, void *, | 195 | typedef int (*xfs_bmapi_t)(struct xfs_trans *, void *, |
194 | xfs_fileoff_t, xfs_filblks_t, int, | 196 | xfs_fileoff_t, xfs_filblks_t, int, |
195 | xfs_fsblock_t *, xfs_extlen_t, | 197 | xfs_fsblock_t *, xfs_extlen_t, |
196 | struct xfs_bmbt_irec *, int *, | 198 | struct xfs_bmbt_irec *, int *, |
197 | struct xfs_bmap_free *); | 199 | struct xfs_bmap_free *, struct xfs_extdelta *); |
200 | typedef int (*xfs_bunmapi_t)(struct xfs_trans *, | ||
201 | void *, xfs_fileoff_t, | ||
202 | xfs_filblks_t, int, xfs_extnum_t, | ||
203 | xfs_fsblock_t *, struct xfs_bmap_free *, | ||
204 | struct xfs_extdelta *, int *); | ||
198 | typedef int (*xfs_bmap_eof_t)(void *, xfs_fileoff_t, int, int *); | 205 | typedef int (*xfs_bmap_eof_t)(void *, xfs_fileoff_t, int, int *); |
199 | typedef int (*xfs_iomap_write_direct_t)( | 206 | typedef int (*xfs_iomap_write_direct_t)( |
200 | void *, xfs_off_t, size_t, int, | 207 | void *, xfs_off_t, size_t, int, |
@@ -213,11 +220,14 @@ typedef void (*xfs_lock_demote_t)(void *, uint); | |||
213 | typedef int (*xfs_lock_nowait_t)(void *, uint); | 220 | typedef int (*xfs_lock_nowait_t)(void *, uint); |
214 | typedef void (*xfs_unlk_t)(void *, unsigned int); | 221 | typedef void (*xfs_unlk_t)(void *, unsigned int); |
215 | typedef xfs_fsize_t (*xfs_size_t)(void *); | 222 | typedef xfs_fsize_t (*xfs_size_t)(void *); |
216 | typedef xfs_fsize_t (*xfs_iodone_t)(struct vfs *); | 223 | typedef xfs_fsize_t (*xfs_iodone_t)(struct bhv_vfs *); |
224 | typedef int (*xfs_swap_extents_t)(void *, void *, | ||
225 | struct xfs_swapext*); | ||
217 | 226 | ||
218 | typedef struct xfs_ioops { | 227 | typedef struct xfs_ioops { |
219 | xfs_ioinit_t xfs_ioinit; | 228 | xfs_ioinit_t xfs_ioinit; |
220 | xfs_bmapi_t xfs_bmapi_func; | 229 | xfs_bmapi_t xfs_bmapi_func; |
230 | xfs_bunmapi_t xfs_bunmapi_func; | ||
221 | xfs_bmap_eof_t xfs_bmap_eof_func; | 231 | xfs_bmap_eof_t xfs_bmap_eof_func; |
222 | xfs_iomap_write_direct_t xfs_iomap_write_direct; | 232 | xfs_iomap_write_direct_t xfs_iomap_write_direct; |
223 | xfs_iomap_write_delay_t xfs_iomap_write_delay; | 233 | xfs_iomap_write_delay_t xfs_iomap_write_delay; |
@@ -230,13 +240,17 @@ typedef struct xfs_ioops { | |||
230 | xfs_unlk_t xfs_unlock; | 240 | xfs_unlk_t xfs_unlock; |
231 | xfs_size_t xfs_size_func; | 241 | xfs_size_t xfs_size_func; |
232 | xfs_iodone_t xfs_iodone; | 242 | xfs_iodone_t xfs_iodone; |
243 | xfs_swap_extents_t xfs_swap_extents_func; | ||
233 | } xfs_ioops_t; | 244 | } xfs_ioops_t; |
234 | 245 | ||
235 | #define XFS_IOINIT(vfsp, args, flags) \ | 246 | #define XFS_IOINIT(vfsp, args, flags) \ |
236 | (*(mp)->m_io_ops.xfs_ioinit)(vfsp, args, flags) | 247 | (*(mp)->m_io_ops.xfs_ioinit)(vfsp, args, flags) |
237 | #define XFS_BMAPI(mp, trans,io,bno,len,f,first,tot,mval,nmap,flist) \ | 248 | #define XFS_BMAPI(mp, trans,io,bno,len,f,first,tot,mval,nmap,flist,delta) \ |
238 | (*(mp)->m_io_ops.xfs_bmapi_func) \ | 249 | (*(mp)->m_io_ops.xfs_bmapi_func) \ |
239 | (trans,(io)->io_obj,bno,len,f,first,tot,mval,nmap,flist) | 250 | (trans,(io)->io_obj,bno,len,f,first,tot,mval,nmap,flist,delta) |
251 | #define XFS_BUNMAPI(mp, trans,io,bno,len,f,nexts,first,flist,delta,done) \ | ||
252 | (*(mp)->m_io_ops.xfs_bunmapi_func) \ | ||
253 | (trans,(io)->io_obj,bno,len,f,nexts,first,flist,delta,done) | ||
240 | #define XFS_BMAP_EOF(mp, io, endoff, whichfork, eof) \ | 254 | #define XFS_BMAP_EOF(mp, io, endoff, whichfork, eof) \ |
241 | (*(mp)->m_io_ops.xfs_bmap_eof_func) \ | 255 | (*(mp)->m_io_ops.xfs_bmap_eof_func) \ |
242 | ((io)->io_obj, endoff, whichfork, eof) | 256 | ((io)->io_obj, endoff, whichfork, eof) |
@@ -266,6 +280,9 @@ typedef struct xfs_ioops { | |||
266 | (*(mp)->m_io_ops.xfs_size_func)((io)->io_obj) | 280 | (*(mp)->m_io_ops.xfs_size_func)((io)->io_obj) |
267 | #define XFS_IODONE(vfsp) \ | 281 | #define XFS_IODONE(vfsp) \ |
268 | (*(mp)->m_io_ops.xfs_iodone)(vfsp) | 282 | (*(mp)->m_io_ops.xfs_iodone)(vfsp) |
283 | #define XFS_SWAP_EXTENTS(mp, io, tio, sxp) \ | ||
284 | (*(mp)->m_io_ops.xfs_swap_extents_func) \ | ||
285 | ((io)->io_obj, (tio)->io_obj, sxp) | ||
269 | 286 | ||
270 | #ifdef HAVE_PERCPU_SB | 287 | #ifdef HAVE_PERCPU_SB |
271 | 288 | ||
@@ -386,8 +403,6 @@ typedef struct xfs_mount { | |||
386 | __uint8_t m_inode_quiesce;/* call quiesce on new inodes. | 403 | __uint8_t m_inode_quiesce;/* call quiesce on new inodes. |
387 | field governed by m_ilock */ | 404 | field governed by m_ilock */ |
388 | __uint8_t m_sectbb_log; /* sectlog - BBSHIFT */ | 405 | __uint8_t m_sectbb_log; /* sectlog - BBSHIFT */ |
389 | __uint8_t m_dirversion; /* 1 or 2 */ | ||
390 | xfs_dirops_t m_dirops; /* table of dir funcs */ | ||
391 | int m_dirblksize; /* directory block sz--bytes */ | 406 | int m_dirblksize; /* directory block sz--bytes */ |
392 | int m_dirblkfsbs; /* directory block sz--fsbs */ | 407 | int m_dirblkfsbs; /* directory block sz--fsbs */ |
393 | xfs_dablk_t m_dirdatablk; /* blockno of dir data v2 */ | 408 | xfs_dablk_t m_dirdatablk; /* blockno of dir data v2 */ |
@@ -494,16 +509,7 @@ xfs_preferred_iosize(xfs_mount_t *mp) | |||
494 | 509 | ||
495 | #define XFS_FORCED_SHUTDOWN(mp) ((mp)->m_flags & XFS_MOUNT_FS_SHUTDOWN) | 510 | #define XFS_FORCED_SHUTDOWN(mp) ((mp)->m_flags & XFS_MOUNT_FS_SHUTDOWN) |
496 | #define xfs_force_shutdown(m,f) \ | 511 | #define xfs_force_shutdown(m,f) \ |
497 | VFS_FORCE_SHUTDOWN((XFS_MTOVFS(m)), f, __FILE__, __LINE__) | 512 | bhv_vfs_force_shutdown((XFS_MTOVFS(m)), f, __FILE__, __LINE__) |
498 | |||
499 | /* | ||
500 | * Flags sent to xfs_force_shutdown. | ||
501 | */ | ||
502 | #define XFS_METADATA_IO_ERROR 0x1 | ||
503 | #define XFS_LOG_IO_ERROR 0x2 | ||
504 | #define XFS_FORCE_UMOUNT 0x4 | ||
505 | #define XFS_CORRUPT_INCORE 0x8 /* Corrupt in-memory data structures */ | ||
506 | #define XFS_SHUTDOWN_REMOTE_REQ 0x10 /* Shutdown came from remote cell */ | ||
507 | 513 | ||
508 | /* | 514 | /* |
509 | * Flags for xfs_mountfs | 515 | * Flags for xfs_mountfs |
@@ -521,7 +527,7 @@ xfs_preferred_iosize(xfs_mount_t *mp) | |||
521 | * Macros for getting from mount to vfs and back. | 527 | * Macros for getting from mount to vfs and back. |
522 | */ | 528 | */ |
523 | #define XFS_MTOVFS(mp) xfs_mtovfs(mp) | 529 | #define XFS_MTOVFS(mp) xfs_mtovfs(mp) |
524 | static inline struct vfs *xfs_mtovfs(xfs_mount_t *mp) | 530 | static inline struct bhv_vfs *xfs_mtovfs(xfs_mount_t *mp) |
525 | { | 531 | { |
526 | return bhvtovfs(&mp->m_bhv); | 532 | return bhvtovfs(&mp->m_bhv); |
527 | } | 533 | } |
@@ -533,7 +539,7 @@ static inline xfs_mount_t *xfs_bhvtom(bhv_desc_t *bdp) | |||
533 | } | 539 | } |
534 | 540 | ||
535 | #define XFS_VFSTOM(vfs) xfs_vfstom(vfs) | 541 | #define XFS_VFSTOM(vfs) xfs_vfstom(vfs) |
536 | static inline xfs_mount_t *xfs_vfstom(vfs_t *vfs) | 542 | static inline xfs_mount_t *xfs_vfstom(bhv_vfs_t *vfs) |
537 | { | 543 | { |
538 | return XFS_BHVTOM(bhv_lookup(VFS_BHVHEAD(vfs), &xfs_vfsops)); | 544 | return XFS_BHVTOM(bhv_lookup(VFS_BHVHEAD(vfs), &xfs_vfsops)); |
539 | } | 545 | } |
@@ -571,7 +577,7 @@ typedef struct xfs_mod_sb { | |||
571 | extern xfs_mount_t *xfs_mount_init(void); | 577 | extern xfs_mount_t *xfs_mount_init(void); |
572 | extern void xfs_mod_sb(xfs_trans_t *, __int64_t); | 578 | extern void xfs_mod_sb(xfs_trans_t *, __int64_t); |
573 | extern void xfs_mount_free(xfs_mount_t *mp, int remove_bhv); | 579 | extern void xfs_mount_free(xfs_mount_t *mp, int remove_bhv); |
574 | extern int xfs_mountfs(struct vfs *, xfs_mount_t *mp, int); | 580 | extern int xfs_mountfs(struct bhv_vfs *, xfs_mount_t *mp, int); |
575 | extern void xfs_mountfs_check_barriers(xfs_mount_t *mp); | 581 | extern void xfs_mountfs_check_barriers(xfs_mount_t *mp); |
576 | 582 | ||
577 | extern int xfs_unmountfs(xfs_mount_t *, struct cred *); | 583 | extern int xfs_unmountfs(xfs_mount_t *, struct cred *); |
@@ -589,7 +595,7 @@ extern void xfs_freesb(xfs_mount_t *); | |||
589 | extern void xfs_do_force_shutdown(bhv_desc_t *, int, char *, int); | 595 | extern void xfs_do_force_shutdown(bhv_desc_t *, int, char *, int); |
590 | extern int xfs_syncsub(xfs_mount_t *, int, int, int *); | 596 | extern int xfs_syncsub(xfs_mount_t *, int, int, int *); |
591 | extern int xfs_sync_inodes(xfs_mount_t *, int, int, int *); | 597 | extern int xfs_sync_inodes(xfs_mount_t *, int, int, int *); |
592 | extern xfs_agnumber_t xfs_initialize_perag(struct vfs *, xfs_mount_t *, | 598 | extern xfs_agnumber_t xfs_initialize_perag(struct bhv_vfs *, xfs_mount_t *, |
593 | xfs_agnumber_t); | 599 | xfs_agnumber_t); |
594 | extern void xfs_xlatesb(void *, struct xfs_sb *, int, __int64_t); | 600 | extern void xfs_xlatesb(void *, struct xfs_sb *, int, __int64_t); |
595 | 601 | ||