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

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=872529c4aa5e0501908ec68981fbe408fcba550d
Commit:        872529c4aa5e0501908ec68981fbe408fcba550d
Parent:        32467b220a4bf6aa08eb861d3595b860572cf5f3
Author:        Bob Peterson <rpeterso@redhat.com>
AuthorDate:    Wed May 20 10:39:10 2009 -0500
Committer:     Bob Peterson <rpeterso@redhat.com>
CommitterDate: Wed May 20 11:06:14 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 779d715..0e2aaff 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -94,7 +94,13 @@ int get_gfs_struct_info(char *buf, int *block_type, int *struct_len)
 			*struct_len = sizeof(struct gfs2_meta_header);
 		break;
 	case GFS2_METATYPE_LH:   /* 8 (log header) */
-		*struct_len = sizeof(struct gfs2_log_header);
+		if (gfs1)
+			*struct_len = 512; /* gfs copies the log header
+					      twice and compares the copy,
+					      so we need to save all 512
+					      bytes of it. */
+		else
+			*struct_len = sizeof(struct gfs2_log_header);
 		break;
 	case GFS2_METATYPE_LD:   /* 9 (log descriptor) */
 		*struct_len = sbd.bsize;


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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-20 16:52 cluster: STABLE2 - 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).