This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: RHEL5 - mount failure after gfs2_edit restoremeta of GFSfile system


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=958e09ffc9135f4ba22064b095d1dcc03160b6f3
Commit:        958e09ffc9135f4ba22064b095d1dcc03160b6f3
Parent:        7ef5811c939381771d2c144e284c801b5445c909
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 10:39:10 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 29ddbb8..ba800aa 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -106,7 +106,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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]