Reduce size of version numbers
PATCH 1/1 Reduce size of version numbers
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 <[email protected]>
--
fs/gfs2/incore.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
fs/gfs2/incore.h +3 -3
@@ -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;