]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_mount.h
[XFS] streamline init/exit path
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_mount.h
index f7c620ec6e695eb338b4da9a21692bf5d0c59608..5269bd6e3df08ffa624ccf8c1e691ccd0622c33c 100644 (file)
@@ -61,22 +61,23 @@ struct xfs_bmap_free;
 struct xfs_extdelta;
 struct xfs_swapext;
 struct xfs_mru_cache;
+struct xfs_nameops;
 
 /*
  * Prototypes and functions for the Data Migration subsystem.
  */
 
-typedef int    (*xfs_send_data_t)(int, bhv_vnode_t *,
-                       xfs_off_t, size_t, int, bhv_vrwlock_t *);
+typedef int    (*xfs_send_data_t)(int, struct xfs_inode *,
+                       xfs_off_t, size_t, int, int *);
 typedef int    (*xfs_send_mmap_t)(struct vm_area_struct *, uint);
-typedef int    (*xfs_send_destroy_t)(bhv_vnode_t *, dm_right_t);
+typedef int    (*xfs_send_destroy_t)(struct xfs_inode *, dm_right_t);
 typedef int    (*xfs_send_namesp_t)(dm_eventtype_t, struct xfs_mount *,
-                       bhv_vnode_t *,
-                       dm_right_t, bhv_vnode_t *, dm_right_t,
-                       char *, char *, mode_t, int, int);
+                       struct xfs_inode *, dm_right_t,
+                       struct xfs_inode *, dm_right_t,
+                       const char *, const char *, mode_t, int, int);
 typedef int    (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t,
                        char *, char *);
-typedef void   (*xfs_send_unmount_t)(struct xfs_mount *, bhv_vnode_t *,
+typedef void   (*xfs_send_unmount_t)(struct xfs_mount *, struct xfs_inode *,
                        dm_right_t, mode_t, int, int);
 
 typedef struct xfs_dmops {
@@ -88,20 +89,20 @@ typedef struct xfs_dmops {
        xfs_send_unmount_t      xfs_send_unmount;
 } xfs_dmops_t;
 
-#define XFS_SEND_DATA(mp, ev,vp,off,len,fl,lock) \
-       (*(mp)->m_dm_ops->xfs_send_data)(ev,vp,off,len,fl,lock)
+#define XFS_SEND_DATA(mp, ev,ip,off,len,fl,lock) \
+       (*(mp)->m_dm_ops->xfs_send_data)(ev,ip,off,len,fl,lock)
 #define XFS_SEND_MMAP(mp, vma,fl) \
        (*(mp)->m_dm_ops->xfs_send_mmap)(vma,fl)
-#define XFS_SEND_DESTROY(mp, vp,right) \
-       (*(mp)->m_dm_ops->xfs_send_destroy)(vp,right)
+#define XFS_SEND_DESTROY(mp, ip,right) \
+       (*(mp)->m_dm_ops->xfs_send_destroy)(ip,right)
 #define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
        (*(mp)->m_dm_ops->xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl)
 #define XFS_SEND_PREUNMOUNT(mp,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
        (*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT,mp,b1,r1,b2,r2,n1,n2,mode,rval,fl)
 #define XFS_SEND_MOUNT(mp,right,path,name) \
        (*(mp)->m_dm_ops->xfs_send_mount)(mp,right,path,name)
-#define XFS_SEND_UNMOUNT(mp, vp,right,mode,rval,fl) \
-       (*(mp)->m_dm_ops->xfs_send_unmount)(mp,vp,right,mode,rval,fl)
+#define XFS_SEND_UNMOUNT(mp, ip,right,mode,rval,fl) \
+       (*(mp)->m_dm_ops->xfs_send_unmount)(mp,ip,right,mode,rval,fl)
 
 
 /*
@@ -206,21 +207,24 @@ typedef struct xfs_icsb_cnts {
 
 #define XFS_ICSB_FLAG_LOCK     (1 << 0)        /* counter lock bit */
 
-#define XFS_ICSB_SB_LOCKED     (1 << 0)        /* sb already locked */
 #define XFS_ICSB_LAZY_COUNT    (1 << 1)        /* accuracy not needed */
 
 extern int     xfs_icsb_init_counters(struct xfs_mount *);
 extern void    xfs_icsb_reinit_counters(struct xfs_mount *);
-extern void    xfs_icsb_sync_counters_flags(struct xfs_mount *, int);
+extern void    xfs_icsb_destroy_counters(struct xfs_mount *);
+extern void    xfs_icsb_sync_counters(struct xfs_mount *, int);
+extern void    xfs_icsb_sync_counters_locked(struct xfs_mount *, int);
 
 #else
-#define xfs_icsb_init_counters(mp)     (0)
-#define xfs_icsb_reinit_counters(mp)   do { } while (0)
-#define xfs_icsb_sync_counters_flags(mp, flags)        do { } while (0)
+#define xfs_icsb_init_counters(mp)             (0)
+#define xfs_icsb_destroy_counters(mp)          do { } while (0)
+#define xfs_icsb_reinit_counters(mp)           do { } while (0)
+#define xfs_icsb_sync_counters(mp, flags)      do { } while (0)
+#define xfs_icsb_sync_counters_locked(mp, flags) do { } while (0)
 #endif
 
 typedef struct xfs_ail {
-       xfs_ail_entry_t         xa_ail;
+       struct list_head        xa_ail;
        uint                    xa_gen;
        struct task_struct      *xa_task;
        xfs_lsn_t               xa_target;
@@ -312,6 +316,7 @@ typedef struct xfs_mount {
        __uint8_t               m_inode_quiesce;/* call quiesce on new inodes.
                                                   field governed by m_ilock */
        __uint8_t               m_sectbb_log;   /* sectlog - BBSHIFT */
+       const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */
        int                     m_dirblksize;   /* directory block sz--bytes */
        int                     m_dirblkfsbs;   /* directory block sz--fsbs */
        xfs_dablk_t             m_dirdatablk;   /* blockno of dir data v2 */
@@ -366,7 +371,7 @@ typedef struct xfs_mount {
 #define XFS_MOUNT_SMALL_INUMS  (1ULL << 15)    /* users wants 32bit inodes */
 #define XFS_MOUNT_NOUUID       (1ULL << 16)    /* ignore uuid during mount */
 #define XFS_MOUNT_BARRIER      (1ULL << 17)
-#define XFS_MOUNT_IDELETE      (1ULL << 18)    /* delete empty inode clusters*/
+#define XFS_MOUNT_IKEEP                (1ULL << 18)    /* keep empty inode clusters*/
 #define XFS_MOUNT_SWALLOC      (1ULL << 19)    /* turn on stripe width
                                                 * allocation */
 #define XFS_MOUNT_RDONLY       (1ULL << 20)    /* read-only fs */
@@ -377,6 +382,7 @@ typedef struct xfs_mount {
                                                   counters */
 #define XFS_MOUNT_FILESTREAMS  (1ULL << 24)    /* enable the filestreams
                                                   allocator */
+#define XFS_MOUNT_NOATTR2      (1ULL << 25)    /* disable use of attr2 format */
 
 
 /*
@@ -401,7 +407,7 @@ typedef struct xfs_mount {
 
 /*
  * Allow large block sizes to be reported to userspace programs if the
- * "largeio" mount option is used. 
+ * "largeio" mount option is used.
  *
  * If compatibility mode is specified, simply return the basic unit of caching
  * so that we don't get inefficient read/modify/write I/O from user apps.
@@ -509,15 +515,12 @@ typedef struct xfs_mod_sb {
 #define        XFS_MOUNT_ILOCK(mp)     mutex_lock(&((mp)->m_ilock))
 #define        XFS_MOUNT_IUNLOCK(mp)   mutex_unlock(&((mp)->m_ilock))
 
-extern xfs_mount_t *xfs_mount_init(void);
 extern void    xfs_mod_sb(xfs_trans_t *, __int64_t);
 extern int     xfs_log_sbcount(xfs_mount_t *, uint);
-extern void    xfs_mount_free(xfs_mount_t *mp);
 extern int     xfs_mountfs(xfs_mount_t *mp, int);
 extern void    xfs_mountfs_check_barriers(xfs_mount_t *mp);
 
-extern int     xfs_unmountfs(xfs_mount_t *, struct cred *);
-extern void    xfs_unmountfs_close(xfs_mount_t *, struct cred *);
+extern int     xfs_unmountfs(xfs_mount_t *);
 extern int     xfs_unmountfs_writesb(xfs_mount_t *);
 extern int     xfs_unmount_flush(xfs_mount_t *, int);
 extern int     xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int64_t, int);
@@ -543,9 +546,6 @@ extern void xfs_qmops_put(struct xfs_mount *);
 
 extern struct xfs_dmops xfs_dmcore_xfs;
 
-extern int     xfs_init(void);
-extern void    xfs_cleanup(void);
-
 #endif /* __KERNEL__ */
 
 #endif /* __XFS_MOUNT_H__ */