diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2008-11-04 05:19:03 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2009-01-05 02:39:01 -0500 |
commit | d8b71f7381769177998acb2f59ddc73465a60fe0 (patch) | |
tree | 3370fab3116cc9bad2c774210a7e497b5fa6f481 /fs | |
parent | 383f01fbf4a701b73f5e35ea805ed1700b4b4db9 (diff) |
GFS2: Move rg_igeneration into struct gfs2_rgrpd
This moves one of the fields of struct gfs2_rgrpd_host into
the struct gfs2_rgrpd with the eventual aim of removing
the struct rgrpd_host completely.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/gfs2/incore.h | 2 | ||||
-rw-r--r-- | fs/gfs2/rgrp.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 6f67e753f883..869ac83297e6 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h | |||
@@ -71,7 +71,6 @@ struct gfs2_bitmap { | |||
71 | struct gfs2_rgrp_host { | 71 | struct gfs2_rgrp_host { |
72 | u32 rg_free; | 72 | u32 rg_free; |
73 | u32 rg_dinodes; | 73 | u32 rg_dinodes; |
74 | u64 rg_igeneration; | ||
75 | }; | 74 | }; |
76 | 75 | ||
77 | struct gfs2_rgrpd { | 76 | struct gfs2_rgrpd { |
@@ -84,6 +83,7 @@ struct gfs2_rgrpd { | |||
84 | u32 rd_data; /* num of data blocks in rgrp */ | 83 | u32 rd_data; /* num of data blocks in rgrp */ |
85 | u32 rd_bitbytes; /* number of bytes in data bitmaps */ | 84 | u32 rd_bitbytes; /* number of bytes in data bitmaps */ |
86 | struct gfs2_rgrp_host rd_rg; | 85 | struct gfs2_rgrp_host rd_rg; |
86 | u64 rd_igeneration; | ||
87 | struct gfs2_bitmap *rd_bits; | 87 | struct gfs2_bitmap *rd_bits; |
88 | unsigned int rd_bh_count; | 88 | unsigned int rd_bh_count; |
89 | struct mutex rd_mutex; | 89 | struct mutex rd_mutex; |
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index bdad0dffc6b4..8e93d62991cc 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -702,7 +702,7 @@ static void gfs2_rgrp_in(struct gfs2_rgrpd *rgd, const void *buf) | |||
702 | rgd->rd_flags &= ~GFS2_RDF_NOALLOC; | 702 | rgd->rd_flags &= ~GFS2_RDF_NOALLOC; |
703 | rg->rg_free = be32_to_cpu(str->rg_free); | 703 | rg->rg_free = be32_to_cpu(str->rg_free); |
704 | rg->rg_dinodes = be32_to_cpu(str->rg_dinodes); | 704 | rg->rg_dinodes = be32_to_cpu(str->rg_dinodes); |
705 | rg->rg_igeneration = be64_to_cpu(str->rg_igeneration); | 705 | rgd->rd_igeneration = be64_to_cpu(str->rg_igeneration); |
706 | } | 706 | } |
707 | 707 | ||
708 | static void gfs2_rgrp_out(struct gfs2_rgrpd *rgd, void *buf) | 708 | static void gfs2_rgrp_out(struct gfs2_rgrpd *rgd, void *buf) |
@@ -717,7 +717,7 @@ static void gfs2_rgrp_out(struct gfs2_rgrpd *rgd, void *buf) | |||
717 | str->rg_free = cpu_to_be32(rg->rg_free); | 717 | str->rg_free = cpu_to_be32(rg->rg_free); |
718 | str->rg_dinodes = cpu_to_be32(rg->rg_dinodes); | 718 | str->rg_dinodes = cpu_to_be32(rg->rg_dinodes); |
719 | str->__pad = cpu_to_be32(0); | 719 | str->__pad = cpu_to_be32(0); |
720 | str->rg_igeneration = cpu_to_be64(rg->rg_igeneration); | 720 | str->rg_igeneration = cpu_to_be64(rgd->rd_igeneration); |
721 | memset(&str->rg_reserved, 0, sizeof(str->rg_reserved)); | 721 | memset(&str->rg_reserved, 0, sizeof(str->rg_reserved)); |
722 | } | 722 | } |
723 | 723 | ||
@@ -1448,7 +1448,7 @@ u64 gfs2_alloc_di(struct gfs2_inode *dip, u64 *generation) | |||
1448 | gfs2_assert_withdraw(sdp, rgd->rd_rg.rg_free); | 1448 | gfs2_assert_withdraw(sdp, rgd->rd_rg.rg_free); |
1449 | rgd->rd_rg.rg_free--; | 1449 | rgd->rd_rg.rg_free--; |
1450 | rgd->rd_rg.rg_dinodes++; | 1450 | rgd->rd_rg.rg_dinodes++; |
1451 | *generation = rgd->rd_rg.rg_igeneration++; | 1451 | *generation = rgd->rd_igeneration++; |
1452 | gfs2_trans_add_bh(rgd->rd_gl, rgd->rd_bits[0].bi_bh, 1); | 1452 | gfs2_trans_add_bh(rgd->rd_gl, rgd->rd_bits[0].bi_bh, 1); |
1453 | gfs2_rgrp_out(rgd, rgd->rd_bits[0].bi_bh->b_data); | 1453 | gfs2_rgrp_out(rgd, rgd->rd_bits[0].bi_bh->b_data); |
1454 | 1454 | ||