cluster: RHEL55 - GFS2: fatal: invalid metadata block after gfs2_grow

Bob Peterson rpeterso at fedoraproject.org
Wed Mar 3 19:39:42 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=276b437eadbcb3a7f96a4fd008f0bb98ecdc8819
Commit:        276b437eadbcb3a7f96a4fd008f0bb98ecdc8819
Parent:        953a56b67037afe26dfcb8f01549041fc88e170d
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Wed Mar 3 13:28:40 2010 -0600
Committer:     Bob Peterson <rpeterso at redhat.com>
CommitterDate: Wed Mar 3 13:36:27 2010 -0600

GFS2: fatal: invalid metadata block after gfs2_grow

This patch adds an fsync(fd) to the bsync function of libgfs2.
The gfs2_grow program was writing out its buffers, then
modifying the rindex, signaling the kernel code to read in the
new rgrp information.  The problem was caused by a timing window
whereby the gfs2 kernel code read in the new blocks before they
landed on disk from those write requests.

rhbz#546683
---
 gfs2/libgfs2/buf.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gfs2/libgfs2/buf.c b/gfs2/libgfs2/buf.c
index fd50d45..3f9e748 100644
--- a/gfs2/libgfs2/buf.c
+++ b/gfs2/libgfs2/buf.c
@@ -187,6 +187,7 @@ void bsync(struct buf_list *bl)
 				bh->b_blocknr, bh->b_blocknr);
 		write_buffer(bl, bh);
 	}
+	fsync(bl->sbp->device_fd);
 }
 
 /* commit buffers to disk but do not discard */


More information about the cluster-commits mailing list