public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: gfs2-utils: master - gfs2_edit: Add missing superblock fields for gfs1 file systems
Date: Mon, 31 Aug 2009 17:52:00 -0000	[thread overview]
Message-ID: <20090831173219.CAA311201D4@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=fdad1b22f08f2bd24cb1983774d6a513306c4647
Commit:        fdad1b22f08f2bd24cb1983774d6a513306c4647
Parent:        f2c6bd843a39c145277243a0240a219bbee40c77
Author:        Bob Peterson <bob@ganesha.peterson>
AuthorDate:    Mon Aug 31 11:32:07 2009 -0500
Committer:     Bob Peterson <rpeterso@redhat.com>
CommitterDate: Mon Aug 31 12:31:47 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.

rhbz#503529
---
 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 ccc764e..db87204 100644
--- a/gfs2/edit/gfs2hex.c
+++ b/gfs2/edit/gfs2hex.c
@@ -497,9 +497,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 5a506a9..de3d4a7 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:52 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:
  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=20090831173219.CAA311201D4@lists.fedorahosted.org \
    --to=rpeterso@fedoraproject.org \
    --cc=cluster-cvs-relay@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 read-only IMAP folder(s) and NNTP newsgroup(s).