From: swhiteho@redhat.com <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] GFS2: Move rg_igeneration into struct gfs2_rgrpd
Date: Mon, 10 Nov 2008 10:31:01 +0000 [thread overview]
Message-ID: <1226313064-2584-7-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1226313064-2584-6-git-send-email-swhiteho@redhat.com>
From: Steven Whitehouse <swhiteho@redhat.com>
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>
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 6f67e75..869ac83 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -71,7 +71,6 @@ struct gfs2_bitmap {
struct gfs2_rgrp_host {
u32 rg_free;
u32 rg_dinodes;
- u64 rg_igeneration;
};
struct gfs2_rgrpd {
@@ -84,6 +83,7 @@ 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_igeneration;
struct gfs2_bitmap *rd_bits;
unsigned int rd_bh_count;
struct mutex rd_mutex;
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index bdad0df..8e93d62 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)
rgd->rd_flags &= ~GFS2_RDF_NOALLOC;
rg->rg_free = be32_to_cpu(str->rg_free);
rg->rg_dinodes = be32_to_cpu(str->rg_dinodes);
- rg->rg_igeneration = be64_to_cpu(str->rg_igeneration);
+ rgd->rd_igeneration = be64_to_cpu(str->rg_igeneration);
}
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)
str->rg_free = cpu_to_be32(rg->rg_free);
str->rg_dinodes = cpu_to_be32(rg->rg_dinodes);
str->__pad = cpu_to_be32(0);
- str->rg_igeneration = cpu_to_be64(rg->rg_igeneration);
+ str->rg_igeneration = cpu_to_be64(rgd->rd_igeneration);
memset(&str->rg_reserved, 0, sizeof(str->rg_reserved));
}
@@ -1448,7 +1448,7 @@ u64 gfs2_alloc_di(struct gfs2_inode *dip, u64 *generation)
gfs2_assert_withdraw(sdp, rgd->rd_rg.rg_free);
rgd->rd_rg.rg_free--;
rgd->rd_rg.rg_dinodes++;
- *generation = rgd->rd_rg.rg_igeneration++;
+ *generation = rgd->rd_igeneration++;
gfs2_trans_add_bh(rgd->rd_gl, rgd->rd_bits[0].bi_bh, 1);
gfs2_rgrp_out(rgd, rgd->rd_bits[0].bi_bh->b_data);
--
1.5.5.1
next prev parent reply other threads:[~2008-11-10 10:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-10 10:30 [Cluster-devel] GFS2 clean up patches swhiteho
2008-11-10 10:30 ` [Cluster-devel] [PATCH] GFS2: Move generation number into "proper" part of inode swhiteho
2008-11-10 10:30 ` [Cluster-devel] [PATCH] GFS2: Move "entries" into "proper" inode swhiteho
2008-11-10 10:30 ` [Cluster-devel] [PATCH] GFS2: Move di_eattr " swhiteho
2008-11-10 10:30 ` [Cluster-devel] [PATCH] GFS2: Move i_size from gfs2_dinode_host and rename it to i_disksize swhiteho
2008-11-10 10:31 ` [Cluster-devel] [PATCH] GFS2: Banish struct gfs2_dinode_host swhiteho
2008-11-10 10:31 ` swhiteho [this message]
2008-11-10 10:31 ` [Cluster-devel] [PATCH] GFS2: Move rg_free from gfs2_rgrpd_host to gfs2_rgrpd swhiteho
2008-11-10 10:31 ` [Cluster-devel] [PATCH] GFS2: Banish struct gfs2_rgrpd_host swhiteho
2008-11-10 10:31 ` [Cluster-devel] [PATCH] GFS2: Add more detail to debugfs glock dumps swhiteho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1226313064-2584-7-git-send-email-swhiteho@redhat.com \
--to=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).