From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Mon, 28 Jan 2008 21:48:01 -0600 Subject: [Cluster-devel] [GFS2 PATCH] Reduce size of version numbers Message-ID: <1201578481.18461.113.camel@technetium.msp.redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, This patch changes the version number values in three structures from 64-bit to 16-bit. These values are never compared in a greater-than or less-than, so wrap-around shouldn't be an issue. Eventually we can get rid of these altogether in favor of a bit or two. The locations were moved to facilitate intelligent data packing by the compiler. Regards, Bob Peterson Red Hat GFS Signed-off-by: Bob Peterson -- fs/gfs2/incore.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 9c090e1..ab682c0 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -85,7 +85,6 @@ 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; @@ -94,6 +93,7 @@ struct gfs2_rgrpd { u32 rd_last_alloc_data; u32 rd_last_alloc_meta; struct gfs2_sbd *rd_sbd; + u16 rd_rg_vn; unsigned char rd_flags; #define GFS2_RDF_CHECK 0x01 /* Need to check for unlinked inodes */ #define GFS2_RDF_NOALLOC 0x02 /* rg prohibits allocation */ @@ -197,7 +197,6 @@ struct gfs2_glock { char *gl_lvb; atomic_t gl_lvb_count; - u64 gl_vn; unsigned long gl_stamp; unsigned long gl_tchange; void *gl_object; @@ -210,6 +209,7 @@ struct gfs2_glock { struct list_head gl_ail_list; atomic_t gl_ail_count; struct delayed_work gl_work; + u16 gl_vn; }; struct gfs2_alloc { @@ -532,7 +532,7 @@ struct gfs2_sbd { /* Resource group stuff */ - u64 sd_rindex_vn; + u16 sd_rindex_vn; spinlock_t sd_rindex_spin; struct mutex sd_rindex_mutex; struct list_head sd_rindex_list;