GFS2: Improve statfs and quota usability
[safe/jmp/linux-2.6] / fs / gfs2 / incore.h
index de50d86..c239b0f 100644 (file)
@@ -64,9 +64,12 @@ struct gfs2_log_element {
        const struct gfs2_log_operations *le_ops;
 };
 
+#define GBF_FULL 1
+
 struct gfs2_bitmap {
        struct buffer_head *bi_bh;
        char *bi_clone;
+       unsigned long bi_flags;
        u32 bi_offset;
        u32 bi_start;
        u32 bi_len;
@@ -91,7 +94,7 @@ struct gfs2_rgrpd {
        struct gfs2_sbd *rd_sbd;
        unsigned int rd_bh_count;
        u32 rd_last_alloc;
-       unsigned char rd_flags;
+       u32 rd_flags;
 #define GFS2_RDF_CHECK         0x10000000 /* check for unlinked inodes */
 #define GFS2_RDF_UPTODATE      0x20000000 /* rg is up to date */
 #define GFS2_RDF_ERROR         0x40000000 /* error in rg */
@@ -156,6 +159,7 @@ struct gfs2_glock_operations {
        int (*go_lock) (struct gfs2_holder *gh);
        void (*go_unlock) (struct gfs2_holder *gh);
        int (*go_dump)(struct seq_file *seq, const struct gfs2_glock *gl);
+       void (*go_callback) (struct gfs2_glock *gl);
        const int go_type;
        const unsigned long go_min_hold_time;
 };
@@ -225,6 +229,7 @@ struct gfs2_glock {
        struct list_head gl_ail_list;
        atomic_t gl_ail_count;
        struct delayed_work gl_work;
+       struct work_struct gl_delete;
 };
 
 #define GFS2_MIN_LVB_SIZE 32   /* Min size of LVB that gfs2 supports */
@@ -401,6 +406,12 @@ struct gfs2_statfs_change_host {
 #define GFS2_DATA_WRITEBACK    1
 #define GFS2_DATA_ORDERED      2
 
+#define GFS2_ERRORS_DEFAULT     GFS2_ERRORS_WITHDRAW
+#define GFS2_ERRORS_WITHDRAW    0
+#define GFS2_ERRORS_CONTINUE    1 /* place holder for future feature */
+#define GFS2_ERRORS_RO          2 /* place holder for future feature */
+#define GFS2_ERRORS_PANIC       3
+
 struct gfs2_args {
        char ar_lockproto[GFS2_LOCKNAME_LEN];   /* Name of the Lock Protocol */
        char ar_locktable[GFS2_LOCKNAME_LEN];   /* Name of the Lock Table */
@@ -417,7 +428,11 @@ struct gfs2_args {
        unsigned int ar_data:2;                 /* ordered/writeback */
        unsigned int ar_meta:1;                 /* mount metafs */
        unsigned int ar_discard:1;              /* discard requests */
+       unsigned int ar_errors:2;               /* errors=withdraw | panic */
        int ar_commit;                          /* Commit interval */
+       int ar_statfs_quantum;                  /* The fast statfs interval */
+       int ar_quota_quantum;                   /* The quota interval */
+       int ar_statfs_percent;                  /* The % change to force sync */
 };
 
 struct gfs2_tune {
@@ -484,7 +499,6 @@ struct gfs2_sb_host {
  */
 
 struct lm_lockstruct {
-       u32 ls_id;
        unsigned int ls_jid;
        unsigned int ls_first;
        unsigned int ls_first_done;
@@ -536,23 +550,18 @@ struct gfs2_sbd {
        struct dentry *sd_root_dir;
 
        struct inode *sd_jindex;
-       struct inode *sd_inum_inode;
        struct inode *sd_statfs_inode;
-       struct inode *sd_ir_inode;
        struct inode *sd_sc_inode;
        struct inode *sd_qc_inode;
        struct inode *sd_rindex;
        struct inode *sd_quota_inode;
 
-       /* Inum stuff */
-
-       struct mutex sd_inum_mutex;
-
        /* StatFS stuff */
 
        spinlock_t sd_statfs_spin;
        struct gfs2_statfs_change_host sd_statfs_master;
        struct gfs2_statfs_change_host sd_statfs_local;
+       int sd_statfs_force_sync;
 
        /* Resource group stuff */
 
@@ -575,7 +584,6 @@ struct gfs2_sbd {
        struct gfs2_holder sd_journal_gh;
        struct gfs2_holder sd_jinode_gh;
 
-       struct gfs2_holder sd_ir_gh;
        struct gfs2_holder sd_sc_gh;
        struct gfs2_holder sd_qc_gh;