public inbox for
help / color / mirror / Atom feed
From: Bob Peterson <>
Subject: cluster: STABLE3 - gfs2_edit: Add missing superblock fields for gfs1 file systems
Date: Mon, 31 Aug 2009 17:34:00 -0000	[thread overview]
Message-ID: <> (raw)

Commit:        a3dadcedb804eabfc014b31ba5258d46175828a0
Parent:        90537c74d4c0c67b0f0970752c1d1960c178f4a8
Author:        Bob Peterson <bob@ganesha.peterson>
AuthorDate:    Mon Aug 31 11:32:07 2009 -0500
Committer:     Bob Peterson <bob@ganesha.peterson>
CommitterDate: Mon Aug 31 11:32:07 2009 -0500

gfs2_edit: Add missing superblock fields for gfs1 file systems

This patch adds GFS1 fields sb_flags and sb_seg_size when
printing structures for GFS1 file system superblocks.

 gfs2/edit/gfs2hex.c |    3 +++
 gfs2/edit/hexedit.c |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c
index 07b42c7..b7e9c81 100644
--- a/gfs2/edit/gfs2hex.c
+++ b/gfs2/edit/gfs2hex.c
@@ -495,9 +495,12 @@ static void gfs2_sb_print2(struct gfs2_sb *sbp2)
 	pv(sbp2, sb_fs_format, "%u", "0x%x");
 	pv(sbp2, sb_multihost_format, "%u", "0x%x");
+	if (gfs1)
+		pv(sbd1, sb_flags, "%u", "0x%x");
 	pv(sbp2, sb_bsize, "%u", "0x%x");
 	pv(sbp2, sb_bsize_shift, "%u", "0x%x");
 	if (gfs1) {
+		pv(sbd1, sb_seg_size, "%u", "0x%x");
 		gfs2_inum_print2("jindex ino", &sbd1->sb_jindex_di);
 		gfs2_inum_print2("rindex ino", &sbd1->sb_rindex_di);
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index 0184e2f..35fce6e 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -1671,6 +1671,8 @@ static void read_superblock(int fd)
 		struct gfs_sb *sbbuf = (struct gfs_sb *)buf;
 		gfs1 = TRUE;
+		sbd1->sb_flags = be32_to_cpu(sbbuf->sb_flags);
+		sbd1->sb_seg_size = be32_to_cpu(sbbuf->sb_seg_size);
 		gfs2_inum_in(&sbd1->sb_rindex_di, (void *)&sbbuf->sb_rindex_di);
 		gfs2_inum_in(&gfs1_quota_di, (void *)&sbbuf->sb_quota_di);
 		gfs2_inum_in(&gfs1_license_di, (void *)&sbbuf->sb_license_di);

                 reply	other threads:[~2009-08-31 17:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* 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 read-only IMAP folder(s) and NNTP newsgroup(s).