]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_mount.h
xfs: prevent lockdep false positive in xfs_iget_cache_miss
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_mount.h
index d70314302520af6a4e0d1a5dfbd62aacbac386c3..f5e9937f9bdb5266e2702c9c653cb7a683f09a2f 100644 (file)
@@ -18,8 +18,6 @@
 #ifndef __XFS_MOUNT_H__
 #define        __XFS_MOUNT_H__
 
-#include "xfs_sync.h"
-
 typedef struct xfs_trans_reservations {
        uint    tr_write;       /* extent alloc trans */
        uint    tr_itruncate;   /* truncate trans */
@@ -46,13 +44,15 @@ typedef struct xfs_trans_reservations {
 
 #ifndef __KERNEL__
 
-#define XFS_DADDR_TO_AGNO(mp,d) \
+#define xfs_daddr_to_agno(mp,d) \
        ((xfs_agnumber_t)(XFS_BB_TO_FSBT(mp, d) / (mp)->m_sb.sb_agblocks))
-#define XFS_DADDR_TO_AGBNO(mp,d) \
+#define xfs_daddr_to_agbno(mp,d) \
        ((xfs_agblock_t)(XFS_BB_TO_FSBT(mp, d) % (mp)->m_sb.sb_agblocks))
 
 #else /* __KERNEL__ */
 
+#include "xfs_sync.h"
+
 struct cred;
 struct log;
 struct xfs_mount_args;
@@ -117,7 +117,7 @@ struct xfs_quotainfo;
 
 typedef int    (*xfs_qminit_t)(struct xfs_mount *, uint *, uint *);
 typedef int    (*xfs_qmmount_t)(struct xfs_mount *, uint, uint);
-typedef int    (*xfs_qmunmount_t)(struct xfs_mount *);
+typedef void   (*xfs_qmunmount_t)(struct xfs_mount *);
 typedef void   (*xfs_qmdone_t)(struct xfs_mount *);
 typedef void   (*xfs_dqrele_t)(struct xfs_dquot *);
 typedef int    (*xfs_dqattach_t)(struct xfs_inode *, uint);
@@ -241,7 +241,6 @@ typedef struct xfs_mount {
        xfs_agnumber_t          m_agirotor;     /* last ag dir inode alloced */
        spinlock_t              m_agirotor_lock;/* .. and lock protecting it */
        xfs_agnumber_t          m_maxagi;       /* highest inode alloc group */
-       uint                    m_ireclaims;    /* count of calls to reclaim*/
        uint                    m_readio_log;   /* min read size log bytes */
        uint                    m_readio_blocks; /* min read size blocks */
        uint                    m_writeio_log;  /* min write size log bytes */
@@ -302,8 +301,6 @@ typedef struct xfs_mount {
        int                     m_sinoalign;    /* stripe unit inode alignment */
        int                     m_attr_magicpct;/* 37% of the blocksize */
        int                     m_dir_magicpct; /* 37% of the dir blocksize */
-       __uint8_t               m_mk_sharedro;  /* mark shared ro on unmount */
-       __uint8_t               m_inode_quiesce;/* call quiesce on new inodes. */
        __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 */
@@ -330,6 +327,8 @@ typedef struct xfs_mount {
        spinlock_t              m_sync_lock;    /* work item list lock */
        int                     m_sync_seq;     /* sync thread generation no. */
        wait_queue_head_t       m_wait_single_sync_task;
+       __int64_t               m_update_flags; /* sb flags we need to update
+                                                  on the next remount,rw */
 } xfs_mount_t;
 
 /*
@@ -351,7 +350,6 @@ typedef struct xfs_mount {
 #define XFS_MOUNT_ATTR2                (1ULL << 8)     /* allow use of attr2 format */
 #define XFS_MOUNT_GRPID                (1ULL << 9)     /* group-ID assigned from directory */
 #define XFS_MOUNT_NORECOVERY   (1ULL << 10)    /* no recovery - dirty fs */
-#define XFS_MOUNT_SHARED       (1ULL << 11)    /* shared mount */
 #define XFS_MOUNT_DFLT_IOSIZE  (1ULL << 12)    /* set default i/o size */
 #define XFS_MOUNT_OSYNCISOSYNC (1ULL << 13)    /* o_sync is REALLY o_sync */
                                                /* osyncisdsync is now default*/
@@ -428,12 +426,21 @@ void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname,
 #define xfs_force_shutdown(m,f)        \
        xfs_do_force_shutdown(m, f, __FILE__, __LINE__)
 
+#define SHUTDOWN_META_IO_ERROR 0x0001  /* write attempt to metadata failed */
+#define SHUTDOWN_LOG_IO_ERROR  0x0002  /* write attempt to the log failed */
+#define SHUTDOWN_FORCE_UMOUNT  0x0004  /* shutdown from a forced unmount */
+#define SHUTDOWN_CORRUPT_INCORE        0x0008  /* corrupt in-memory data structures */
+#define SHUTDOWN_REMOTE_REQ    0x0010  /* shutdown came from remote cell */
+#define SHUTDOWN_DEVICE_REQ    0x0020  /* failed all paths to the device */
+
+#define xfs_test_for_freeze(mp)                ((mp)->m_super->s_frozen)
+#define xfs_wait_for_freeze(mp,l)      vfs_check_frozen((mp)->m_super, (l))
+
 /*
  * Flags for xfs_mountfs
  */
 #define XFS_MFSI_QUIET         0x40    /* Be silent if mount errors found */
 
-#define XFS_DADDR_TO_AGNO(mp,d)         xfs_daddr_to_agno(mp,d)
 static inline xfs_agnumber_t
 xfs_daddr_to_agno(struct xfs_mount *mp, xfs_daddr_t d)
 {
@@ -442,7 +449,6 @@ xfs_daddr_to_agno(struct xfs_mount *mp, xfs_daddr_t d)
        return (xfs_agnumber_t) ld;
 }
 
-#define XFS_DADDR_TO_AGBNO(mp,d)        xfs_daddr_to_agbno(mp,d)
 static inline xfs_agblock_t
 xfs_daddr_to_agbno(struct xfs_mount *mp, xfs_daddr_t d)
 {
@@ -503,12 +509,12 @@ extern void       xfs_mountfs_check_barriers(xfs_mount_t *mp);
 
 extern void    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);
 extern int     xfs_mod_incore_sb_unlocked(xfs_mount_t *, xfs_sb_field_t,
                        int64_t, int);
 extern int     xfs_mod_incore_sb_batch(xfs_mount_t *, xfs_mod_sb_t *,
                        uint, int);
+extern int     xfs_mount_log_sb(xfs_mount_t *, __int64_t);
 extern struct xfs_buf *xfs_getsb(xfs_mount_t *, int);
 extern int     xfs_readsb(xfs_mount_t *, int);
 extern void    xfs_freesb(xfs_mount_t *);