diff options
Diffstat (limited to 'fs/xfs/xfs_mount.h')
-rw-r--r-- | fs/xfs/xfs_mount.h | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 94f73c523e5f..7f671f8269b4 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
@@ -54,7 +54,6 @@ typedef struct xfs_trans_reservations { | |||
54 | #else | 54 | #else |
55 | struct cred; | 55 | struct cred; |
56 | struct log; | 56 | struct log; |
57 | struct bhv_vfs; | ||
58 | struct xfs_mount_args; | 57 | struct xfs_mount_args; |
59 | struct xfs_inode; | 58 | struct xfs_inode; |
60 | struct xfs_iocore; | 59 | struct xfs_iocore; |
@@ -79,13 +78,13 @@ typedef int (*xfs_send_data_t)(int, bhv_vnode_t *, | |||
79 | xfs_off_t, size_t, int, bhv_vrwlock_t *); | 78 | xfs_off_t, size_t, int, bhv_vrwlock_t *); |
80 | typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint); | 79 | typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint); |
81 | typedef int (*xfs_send_destroy_t)(bhv_vnode_t *, dm_right_t); | 80 | typedef int (*xfs_send_destroy_t)(bhv_vnode_t *, dm_right_t); |
82 | typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct bhv_vfs *, | 81 | typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct xfs_mount *, |
83 | bhv_vnode_t *, | 82 | bhv_vnode_t *, |
84 | dm_right_t, bhv_vnode_t *, dm_right_t, | 83 | dm_right_t, bhv_vnode_t *, dm_right_t, |
85 | char *, char *, mode_t, int, int); | 84 | char *, char *, mode_t, int, int); |
86 | typedef int (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t, | 85 | typedef int (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t, |
87 | char *, char *); | 86 | char *, char *); |
88 | typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, bhv_vnode_t *, | 87 | typedef void (*xfs_send_unmount_t)(struct xfs_mount *, bhv_vnode_t *, |
89 | dm_right_t, mode_t, int, int); | 88 | dm_right_t, mode_t, int, int); |
90 | 89 | ||
91 | typedef struct xfs_dmops { | 90 | typedef struct xfs_dmops { |
@@ -105,12 +104,12 @@ typedef struct xfs_dmops { | |||
105 | (*(mp)->m_dm_ops->xfs_send_destroy)(vp,right) | 104 | (*(mp)->m_dm_ops->xfs_send_destroy)(vp,right) |
106 | #define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ | 105 | #define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ |
107 | (*(mp)->m_dm_ops->xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl) | 106 | (*(mp)->m_dm_ops->xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl) |
108 | #define XFS_SEND_PREUNMOUNT(mp, vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ | 107 | #define XFS_SEND_PREUNMOUNT(mp,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ |
109 | (*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT,vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl) | 108 | (*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT,mp,b1,r1,b2,r2,n1,n2,mode,rval,fl) |
110 | #define XFS_SEND_MOUNT(mp,right,path,name) \ | 109 | #define XFS_SEND_MOUNT(mp,right,path,name) \ |
111 | (*(mp)->m_dm_ops->xfs_send_mount)(mp,right,path,name) | 110 | (*(mp)->m_dm_ops->xfs_send_mount)(mp,right,path,name) |
112 | #define XFS_SEND_UNMOUNT(mp, vfsp,vp,right,mode,rval,fl) \ | 111 | #define XFS_SEND_UNMOUNT(mp, vp,right,mode,rval,fl) \ |
113 | (*(mp)->m_dm_ops->xfs_send_unmount)(vfsp,vp,right,mode,rval,fl) | 112 | (*(mp)->m_dm_ops->xfs_send_unmount)(mp,vp,right,mode,rval,fl) |
114 | 113 | ||
115 | 114 | ||
116 | /* | 115 | /* |
@@ -202,7 +201,7 @@ typedef struct xfs_qmops { | |||
202 | * Prototypes and functions for I/O core modularization. | 201 | * Prototypes and functions for I/O core modularization. |
203 | */ | 202 | */ |
204 | 203 | ||
205 | typedef int (*xfs_ioinit_t)(struct bhv_vfs *, | 204 | typedef int (*xfs_ioinit_t)(struct xfs_mount *, |
206 | struct xfs_mount_args *, int); | 205 | struct xfs_mount_args *, int); |
207 | typedef int (*xfs_bmapi_t)(struct xfs_trans *, void *, | 206 | typedef int (*xfs_bmapi_t)(struct xfs_trans *, void *, |
208 | xfs_fileoff_t, xfs_filblks_t, int, | 207 | xfs_fileoff_t, xfs_filblks_t, int, |
@@ -232,7 +231,7 @@ typedef void (*xfs_lock_demote_t)(void *, uint); | |||
232 | typedef int (*xfs_lock_nowait_t)(void *, uint); | 231 | typedef int (*xfs_lock_nowait_t)(void *, uint); |
233 | typedef void (*xfs_unlk_t)(void *, unsigned int); | 232 | typedef void (*xfs_unlk_t)(void *, unsigned int); |
234 | typedef xfs_fsize_t (*xfs_size_t)(void *); | 233 | typedef xfs_fsize_t (*xfs_size_t)(void *); |
235 | typedef xfs_fsize_t (*xfs_iodone_t)(struct bhv_vfs *); | 234 | typedef xfs_fsize_t (*xfs_iodone_t)(struct xfs_mount *); |
236 | typedef int (*xfs_swap_extents_t)(void *, void *, | 235 | typedef int (*xfs_swap_extents_t)(void *, void *, |
237 | struct xfs_swapext*); | 236 | struct xfs_swapext*); |
238 | 237 | ||
@@ -255,8 +254,8 @@ typedef struct xfs_ioops { | |||
255 | xfs_swap_extents_t xfs_swap_extents_func; | 254 | xfs_swap_extents_t xfs_swap_extents_func; |
256 | } xfs_ioops_t; | 255 | } xfs_ioops_t; |
257 | 256 | ||
258 | #define XFS_IOINIT(vfsp, args, flags) \ | 257 | #define XFS_IOINIT(mp, args, flags) \ |
259 | (*(mp)->m_io_ops.xfs_ioinit)(vfsp, args, flags) | 258 | (*(mp)->m_io_ops.xfs_ioinit)(mp, args, flags) |
260 | #define XFS_BMAPI(mp, trans,io,bno,len,f,first,tot,mval,nmap,flist,delta) \ | 259 | #define XFS_BMAPI(mp, trans,io,bno,len,f,first,tot,mval,nmap,flist,delta) \ |
261 | (*(mp)->m_io_ops.xfs_bmapi_func) \ | 260 | (*(mp)->m_io_ops.xfs_bmapi_func) \ |
262 | (trans,(io)->io_obj,bno,len,f,first,tot,mval,nmap,flist,delta) | 261 | (trans,(io)->io_obj,bno,len,f,first,tot,mval,nmap,flist,delta) |
@@ -290,8 +289,8 @@ typedef struct xfs_ioops { | |||
290 | (*(mp)->m_io_ops.xfs_ilock_demote)((io)->io_obj, mode) | 289 | (*(mp)->m_io_ops.xfs_ilock_demote)((io)->io_obj, mode) |
291 | #define XFS_SIZE(mp, io) \ | 290 | #define XFS_SIZE(mp, io) \ |
292 | (*(mp)->m_io_ops.xfs_size_func)((io)->io_obj) | 291 | (*(mp)->m_io_ops.xfs_size_func)((io)->io_obj) |
293 | #define XFS_IODONE(vfsp) \ | 292 | #define XFS_IODONE(mp) \ |
294 | (*(mp)->m_io_ops.xfs_iodone)(vfsp) | 293 | (*(mp)->m_io_ops.xfs_iodone)(mp) |
295 | #define XFS_SWAP_EXTENTS(mp, io, tio, sxp) \ | 294 | #define XFS_SWAP_EXTENTS(mp, io, tio, sxp) \ |
296 | (*(mp)->m_io_ops.xfs_swap_extents_func) \ | 295 | (*(mp)->m_io_ops.xfs_swap_extents_func) \ |
297 | ((io)->io_obj, (tio)->io_obj, sxp) | 296 | ((io)->io_obj, (tio)->io_obj, sxp) |
@@ -328,7 +327,7 @@ extern void xfs_icsb_sync_counters_flags(struct xfs_mount *, int); | |||
328 | #endif | 327 | #endif |
329 | 328 | ||
330 | typedef struct xfs_mount { | 329 | typedef struct xfs_mount { |
331 | struct bhv_vfs *m_vfsp; | 330 | struct super_block *m_super; |
332 | xfs_tid_t m_tid; /* next unused tid for fs */ | 331 | xfs_tid_t m_tid; /* next unused tid for fs */ |
333 | AIL_LOCK_T m_ail_lock; /* fs AIL mutex */ | 332 | AIL_LOCK_T m_ail_lock; /* fs AIL mutex */ |
334 | xfs_ail_entry_t m_ail; /* fs active log item list */ | 333 | xfs_ail_entry_t m_ail; /* fs active log item list */ |
@@ -548,21 +547,6 @@ void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname, | |||
548 | /* XFS_MFSI_CONVERT_SUNIT */ | 547 | /* XFS_MFSI_CONVERT_SUNIT */ |
549 | #define XFS_MFSI_QUIET 0x40 /* Be silent if mount errors found */ | 548 | #define XFS_MFSI_QUIET 0x40 /* Be silent if mount errors found */ |
550 | 549 | ||
551 | /* | ||
552 | * Macros for getting from mount to vfs and back. | ||
553 | */ | ||
554 | #define XFS_MTOVFS(mp) xfs_mtovfs(mp) | ||
555 | static inline struct bhv_vfs *xfs_mtovfs(xfs_mount_t *mp) | ||
556 | { | ||
557 | return mp->m_vfsp; | ||
558 | } | ||
559 | |||
560 | #define XFS_VFSTOM(vfs) xfs_vfstom(vfs) | ||
561 | static inline xfs_mount_t *xfs_vfstom(bhv_vfs_t *vfs) | ||
562 | { | ||
563 | return vfs->vfs_mount; | ||
564 | } | ||
565 | |||
566 | #define XFS_DADDR_TO_AGNO(mp,d) xfs_daddr_to_agno(mp,d) | 550 | #define XFS_DADDR_TO_AGNO(mp,d) xfs_daddr_to_agno(mp,d) |
567 | static inline xfs_agnumber_t | 551 | static inline xfs_agnumber_t |
568 | xfs_daddr_to_agno(struct xfs_mount *mp, xfs_daddr_t d) | 552 | xfs_daddr_to_agno(struct xfs_mount *mp, xfs_daddr_t d) |
@@ -633,7 +617,7 @@ extern xfs_mount_t *xfs_mount_init(void); | |||
633 | extern void xfs_mod_sb(xfs_trans_t *, __int64_t); | 617 | extern void xfs_mod_sb(xfs_trans_t *, __int64_t); |
634 | extern int xfs_log_sbcount(xfs_mount_t *, uint); | 618 | extern int xfs_log_sbcount(xfs_mount_t *, uint); |
635 | extern void xfs_mount_free(xfs_mount_t *mp); | 619 | extern void xfs_mount_free(xfs_mount_t *mp); |
636 | extern int xfs_mountfs(struct bhv_vfs *, xfs_mount_t *mp, int); | 620 | extern int xfs_mountfs(xfs_mount_t *mp, int); |
637 | extern void xfs_mountfs_check_barriers(xfs_mount_t *mp); | 621 | extern void xfs_mountfs_check_barriers(xfs_mount_t *mp); |
638 | 622 | ||
639 | extern int xfs_unmountfs(xfs_mount_t *, struct cred *); | 623 | extern int xfs_unmountfs(xfs_mount_t *, struct cred *); |
@@ -651,8 +635,7 @@ extern void xfs_freesb(xfs_mount_t *); | |||
651 | extern int xfs_fs_writable(xfs_mount_t *); | 635 | extern int xfs_fs_writable(xfs_mount_t *); |
652 | extern int xfs_syncsub(xfs_mount_t *, int, int *); | 636 | extern int xfs_syncsub(xfs_mount_t *, int, int *); |
653 | extern int xfs_sync_inodes(xfs_mount_t *, int, int *); | 637 | extern int xfs_sync_inodes(xfs_mount_t *, int, int *); |
654 | extern xfs_agnumber_t xfs_initialize_perag(struct bhv_vfs *, xfs_mount_t *, | 638 | extern xfs_agnumber_t xfs_initialize_perag(xfs_mount_t *, xfs_agnumber_t); |
655 | xfs_agnumber_t); | ||
656 | extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *); | 639 | extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *); |
657 | extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t); | 640 | extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t); |
658 | extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t); | 641 | extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t); |