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

Commit:        5092894db39cb3e323648185bcb496f04c9e1938
Parent:        62b8e821509c36b6b35777a0f3c1a459ac084766
Author:        Bob Peterson <>
AuthorDate:    Wed May 20 11:08:19 2009 -0500
Committer:     Bob Peterson <>
CommitterDate: Wed May 20 11:08:19 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 16:53 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).