public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* gfs2-utils: master - mount failure after gfs2_edit restoremeta of GFS file system
@ 2009-05-20 15:39 Bob Peterson
  0 siblings, 0 replies; only message in thread
From: Bob Peterson @ 2009-05-20 15:39 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=764faccef5a7dc6988911502bcfcef806b1f83bb
Commit:        764faccef5a7dc6988911502bcfcef806b1f83bb
Parent:        4b13cb12368d959af971ab8c2cc4aa7bdd08e647
Author:        Bob Peterson <rpeterso@redhat.com>
AuthorDate:    Wed May 20 10:36:52 2009 -0500
Committer:     Bob Peterson <rpeterso@redhat.com>
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);
 		break;
 	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);
 		break;
 	case GFS2_METATYPE_LD:   /* 9 (log descriptor) */
 		*gstruct_len = sbd.bsize;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-20 15:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-20 15:39 gfs2-utils: master - mount failure after gfs2_edit restoremeta of GFS file system Bob Peterson

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).