]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ocfs2/ocfs2.h
ocfs2: temporarily remove extent map caching
[linux-2.6-omap-h63xx.git] / fs / ocfs2 / ocfs2.h
index da1093039c01c0527fb21c970439dc113b19cf6a..faeb53f2eecfa3aa2f246d1c1cb6a0fd2f6d76aa 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/workqueue.h>
 #include <linux/kref.h>
 #include <linux/mutex.h>
+#include <linux/jbd.h>
 
 #include "cluster/nodemanager.h"
 #include "cluster/heartbeat.h"
 #include "endian.h"
 #include "ocfs2_lockid.h"
 
-struct ocfs2_extent_map {
-       u32             em_clusters;
-       struct rb_root  em_extents;
-};
-
 /* Most user visible OCFS2 inodes will have very few pieces of
  * metadata, but larger files (including bitmaps, etc) must be taken
  * into account when designing an access scheme. We allow a small
@@ -179,12 +175,11 @@ enum ocfs2_mount_options
 #define OCFS2_OSB_SOFT_RO      0x0001
 #define OCFS2_OSB_HARD_RO      0x0002
 #define OCFS2_OSB_ERROR_FS     0x0004
+#define OCFS2_DEFAULT_ATIME_QUANTUM    60
 
 struct ocfs2_journal;
-struct ocfs2_journal_handle;
 struct ocfs2_super
 {
-       u32 osb_id;             /* id used by the proc interface */
        struct task_struct *commit_task;
        struct super_block *sb;
        struct inode *root_inode;
@@ -198,7 +193,6 @@ struct ocfs2_super
        struct ocfs2_node_map recovery_map;
        struct ocfs2_node_map umount_map;
 
-       u32 num_clusters;
        u64 root_blkno;
        u64 system_dir_blkno;
        u64 bitmap_blkno;
@@ -220,15 +214,14 @@ struct ocfs2_super
        unsigned long osb_flags;
 
        unsigned long s_mount_opt;
+       unsigned int s_atime_quantum;
 
        u16 max_slots;
-       u16 num_nodes;
        s16 node_num;
        s16 slot_num;
        int s_sectsize_bits;
        int s_clustersize;
        int s_clustersize_bits;
-       struct proc_dir_entry *proc_sub_dir; /* points to /proc/fs/ocfs2/<maj_min> */
 
        atomic_t vol_state;
        struct mutex recovery_lock;
@@ -240,6 +233,7 @@ struct ocfs2_super
 
        enum ocfs2_local_alloc_state local_alloc_state;
        struct buffer_head *local_alloc_bh;
+       u64 la_last_gd;
 
        /* Next two fields are for local node slot recovery during
         * mount. */
@@ -286,7 +280,7 @@ struct ocfs2_super
        /* Truncate log info */
        struct inode                    *osb_tl_inode;
        struct buffer_head              *osb_tl_bh;
-       struct work_struct              osb_truncate_log_wq;
+       struct delayed_work             osb_truncate_log_wq;
 
        struct ocfs2_node_map           osb_recovering_orphan_dirs;
        unsigned int                    *osb_orphan_wipes;
@@ -294,7 +288,6 @@ struct ocfs2_super
 };
 
 #define OCFS2_SB(sb)       ((struct ocfs2_super *)(sb)->s_fs_info)
-#define OCFS2_MAX_OSB_ID             65536
 
 static inline int ocfs2_should_order_data(struct inode *inode)
 {
@@ -305,6 +298,13 @@ static inline int ocfs2_should_order_data(struct inode *inode)
        return 1;
 }
 
+static inline int ocfs2_sparse_alloc(struct ocfs2_super *osb)
+{
+       if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC)
+               return 1;
+       return 0;
+}
+
 /* set / clear functions because cluster events can make these happen
  * in parallel so we want the transitions to be atomic. this also
  * means that any future flags osb_flags must be protected by spinlock
@@ -351,6 +351,11 @@ static inline int ocfs2_is_soft_readonly(struct ocfs2_super *osb)
        return ret;
 }
 
+static inline int ocfs2_mount_local(struct ocfs2_super *osb)
+{
+       return (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT);
+}
+
 #define OCFS2_IS_VALID_DINODE(ptr)                                     \
        (!strcmp((ptr)->i_signature, OCFS2_INODE_SIGNATURE))