public inbox for
help / color / mirror / Atom feed
From: Bob Peterson <>
Subject: gfs2-utils: master - mount failure after gfs2_edit restoremeta of GFS file system
Date: Wed, 20 May 2009 15:39:00 -0000	[thread overview]
Message-ID: <> (raw)

Commit:        764faccef5a7dc6988911502bcfcef806b1f83bb
Parent:        4b13cb12368d959af971ab8c2cc4aa7bdd08e647
Author:        Bob Peterson <>
AuthorDate:    Wed May 20 10:36:52 2009 -0500
Committer:     Bob Peterson <>
CommitterDate: Wed May 20 10:36:52 2009 -0500

mount failure after gfs2_edit restoremeta of GFS file system

bz 501732

This patch fixes a problem with gfs2_edit savemeta.  The problem
was that when saving gfs (gfs1) journals, not enough data was
being saved, due to a redundant copy of the log header data that
gfs copies into the journal at an offset just short of 512 bytes.
Therefore, we need to save 512 bytes of gfs log headers or else
gfs won't be able to mount it.
 gfs2/edit/savemeta.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index 4a36652..5b72547 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -92,7 +92,13 @@ static int get_gfs_struct_info(char *gbuf, int *block_type, int *gstruct_len)
 			*gstruct_len = sizeof(struct gfs2_meta_header);
 	case GFS2_METATYPE_LH:   /* 8 (log header) */
-		*gstruct_len = sizeof(struct gfs2_log_header);
+		if (gfs1)
+			*gstruct_len = 512; /* gfs copies the log header
+					       twice and compares the copy,
+					       so we need to save all 512
+					       bytes of it. */
+		else
+			*gstruct_len = sizeof(struct gfs2_log_header);
 	case GFS2_METATYPE_LD:   /* 9 (log descriptor) */
 		*gstruct_len = sbd.bsize;

                 reply	other threads:[~2009-05-20 15:39 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).