Merge commit 'v2.6.26' into core/locking
[pandora-kernel.git] / fs / gfs2 / incore.h
index 39bab7b..eabe5ea 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) Sistina Software, Inc.  1997-2003 All rights reserved.
- * Copyright (C) 2004-2007 Red Hat, Inc.  All rights reserved.
+ * Copyright (C) 2004-2008 Red Hat, Inc.  All rights reserved.
  *
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
@@ -85,18 +85,17 @@ struct gfs2_rgrpd {
        u32 rd_data;                    /* num of data blocks in rgrp */
        u32 rd_bitbytes;                /* number of bytes in data bitmaps */
        struct gfs2_rgrp_host rd_rg;
-       u64 rd_rg_vn;
        struct gfs2_bitmap *rd_bits;
        unsigned int rd_bh_count;
        struct mutex rd_mutex;
        u32 rd_free_clone;
        struct gfs2_log_element rd_le;
-       u32 rd_last_alloc_data;
-       u32 rd_last_alloc_meta;
+       u32 rd_last_alloc;
        struct gfs2_sbd *rd_sbd;
        unsigned char rd_flags;
 #define GFS2_RDF_CHECK        0x01      /* Need to check for unlinked inodes */
 #define GFS2_RDF_NOALLOC      0x02      /* rg prohibits allocation */
+#define GFS2_RDF_UPTODATE     0x04      /* rg is up to date */
 };
 
 enum gfs2_state_bits {
@@ -167,6 +166,8 @@ enum {
        GLF_DIRTY               = 5,
        GLF_DEMOTE_IN_PROGRESS  = 6,
        GLF_LFLUSH              = 7,
+       GLF_WAITERS2            = 8,
+       GLF_CONV_DEADLK         = 9,
 };
 
 struct gfs2_glock {
@@ -186,18 +187,15 @@ struct gfs2_glock {
        struct list_head gl_holders;
        struct list_head gl_waiters1;   /* HIF_MUTEX */
        struct list_head gl_waiters3;   /* HIF_PROMOTE */
-       int gl_waiters2;                /* GIF_DEMOTE */
 
        const struct gfs2_glock_operations *gl_ops;
 
        struct gfs2_holder *gl_req_gh;
-       gfs2_glop_bh_t gl_req_bh;
 
        void *gl_lock;
        char *gl_lvb;
        atomic_t gl_lvb_count;
 
-       u64 gl_vn;
        unsigned long gl_stamp;
        unsigned long gl_tchange;
        void *gl_object;
@@ -212,6 +210,8 @@ struct gfs2_glock {
        struct delayed_work gl_work;
 };
 
+#define GFS2_MIN_LVB_SIZE 32   /* Min size of LVB that gfs2 supports */
+
 struct gfs2_alloc {
        /* Quota stuff */
 
@@ -236,17 +236,14 @@ enum {
        GIF_INVALID             = 0,
        GIF_QD_LOCKED           = 1,
        GIF_SW_PAGED            = 3,
+       GIF_USER                = 4, /* user inode, not metadata addr space */
 };
 
 struct gfs2_dinode_host {
        u64 di_size;            /* number of bytes in file */
-       u64 di_blocks;          /* number of blocks in file */
-       u64 di_goal_meta;       /* rgrp to alloc from next */
-       u64 di_goal_data;       /* data block goal */
        u64 di_generation;      /* generation number for NFS */
        u32 di_flags;           /* GFS2_DIF_... */
        /* These only apply to directories  */
-       u16 di_depth;           /* Number of bits in the table */
        u32 di_entries;         /* The number of entries in the directory */
        u64 di_eattr;           /* extended attribute block number */
 };
@@ -263,10 +260,10 @@ struct gfs2_inode {
        struct gfs2_holder i_iopen_gh;
        struct gfs2_holder i_gh; /* for prepare/commit_write only */
        struct gfs2_alloc *i_alloc;
-       u64 i_last_rg_alloc;
-
+       u64 i_goal;     /* goal block for allocations */
        struct rw_semaphore i_rw_mutex;
        u8 i_height;
+       u8 i_depth;
 };
 
 /*
@@ -532,7 +529,7 @@ struct gfs2_sbd {
 
        /* Resource group stuff */
 
-       u64 sd_rindex_vn;
+       int sd_rindex_uptodate;
        spinlock_t sd_rindex_spin;
        struct mutex sd_rindex_mutex;
        struct list_head sd_rindex_list;
@@ -636,9 +633,6 @@ struct gfs2_sbd {
 
        /* Counters */
 
-       atomic_t sd_glock_count;
-       atomic_t sd_glock_held_count;
-       atomic_t sd_inode_count;
        atomic_t sd_reclaimed;
 
        char sd_fsname[GFS2_FSNAME_LEN];