aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_mount.h')
-rw-r--r--fs/xfs/xfs_mount.h47
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
55struct cred; 55struct cred;
56struct log; 56struct log;
57struct bhv_vfs;
58struct xfs_mount_args; 57struct xfs_mount_args;
59struct xfs_inode; 58struct xfs_inode;
60struct xfs_iocore; 59struct 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 *);
80typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint); 79typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint);
81typedef int (*xfs_send_destroy_t)(bhv_vnode_t *, dm_right_t); 80typedef int (*xfs_send_destroy_t)(bhv_vnode_t *, dm_right_t);
82typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct bhv_vfs *, 81typedef 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);
86typedef int (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t, 85typedef int (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t,
87 char *, char *); 86 char *, char *);
88typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, bhv_vnode_t *, 87typedef 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
91typedef struct xfs_dmops { 90typedef 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
205typedef int (*xfs_ioinit_t)(struct bhv_vfs *, 204typedef int (*xfs_ioinit_t)(struct xfs_mount *,
206 struct xfs_mount_args *, int); 205 struct xfs_mount_args *, int);
207typedef int (*xfs_bmapi_t)(struct xfs_trans *, void *, 206typedef 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);
232typedef int (*xfs_lock_nowait_t)(void *, uint); 231typedef int (*xfs_lock_nowait_t)(void *, uint);
233typedef void (*xfs_unlk_t)(void *, unsigned int); 232typedef void (*xfs_unlk_t)(void *, unsigned int);
234typedef xfs_fsize_t (*xfs_size_t)(void *); 233typedef xfs_fsize_t (*xfs_size_t)(void *);
235typedef xfs_fsize_t (*xfs_iodone_t)(struct bhv_vfs *); 234typedef xfs_fsize_t (*xfs_iodone_t)(struct xfs_mount *);
236typedef int (*xfs_swap_extents_t)(void *, void *, 235typedef 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
330typedef struct xfs_mount { 329typedef 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)
555static 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)
561static 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)
567static inline xfs_agnumber_t 551static inline xfs_agnumber_t
568xfs_daddr_to_agno(struct xfs_mount *mp, xfs_daddr_t d) 552xfs_daddr_to_agno(struct xfs_mount *mp, xfs_daddr_t d)
@@ -633,7 +617,7 @@ extern xfs_mount_t *xfs_mount_init(void);
633extern void xfs_mod_sb(xfs_trans_t *, __int64_t); 617extern void xfs_mod_sb(xfs_trans_t *, __int64_t);
634extern int xfs_log_sbcount(xfs_mount_t *, uint); 618extern int xfs_log_sbcount(xfs_mount_t *, uint);
635extern void xfs_mount_free(xfs_mount_t *mp); 619extern void xfs_mount_free(xfs_mount_t *mp);
636extern int xfs_mountfs(struct bhv_vfs *, xfs_mount_t *mp, int); 620extern int xfs_mountfs(xfs_mount_t *mp, int);
637extern void xfs_mountfs_check_barriers(xfs_mount_t *mp); 621extern void xfs_mountfs_check_barriers(xfs_mount_t *mp);
638 622
639extern int xfs_unmountfs(xfs_mount_t *, struct cred *); 623extern int xfs_unmountfs(xfs_mount_t *, struct cred *);
@@ -651,8 +635,7 @@ extern void xfs_freesb(xfs_mount_t *);
651extern int xfs_fs_writable(xfs_mount_t *); 635extern int xfs_fs_writable(xfs_mount_t *);
652extern int xfs_syncsub(xfs_mount_t *, int, int *); 636extern int xfs_syncsub(xfs_mount_t *, int, int *);
653extern int xfs_sync_inodes(xfs_mount_t *, int, int *); 637extern int xfs_sync_inodes(xfs_mount_t *, int, int *);
654extern xfs_agnumber_t xfs_initialize_perag(struct bhv_vfs *, xfs_mount_t *, 638extern xfs_agnumber_t xfs_initialize_perag(xfs_mount_t *, xfs_agnumber_t);
655 xfs_agnumber_t);
656extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *); 639extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *);
657extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t); 640extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t);
658extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t); 641extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t);