From: rpeterso@sourceware.org <rpeterso@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gfs/gfs_fsck rgrp.c
Date: 4 May 2007 13:45:18 -0000 [thread overview]
Message-ID: <20070504134518.28676.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: STABLE
Changes by: rpeterso at sourceware.org 2007-05-04 13:45:17
Modified files:
gfs/gfs_fsck : rgrp.c
Log message:
Resolves: bz 238719: GFS fsck is has problems with resource groups
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/gfs_fsck/rgrp.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.3.2.2.4.1.2.2&r2=1.3.2.2.4.1.2.3
--- cluster/gfs/gfs_fsck/rgrp.c 2006/04/20 20:57:26 1.3.2.2.4.1.2.2
+++ cluster/gfs/gfs_fsck/rgrp.c 2007/05/04 13:45:17 1.3.2.2.4.1.2.3
@@ -179,12 +179,27 @@
if (repair_if_corrupted) {
if (query(sdp, "Fix the RG? (y/n)")) {
log_err("Attempting to repair the RG.\n");
- memset(&rgd->rd_rg, 0, sizeof(struct gfs_rgrp));
- rgd->rd_rg.rg_header.mh_magic = GFS_MAGIC;
- rgd->rd_rg.rg_header.mh_type = GFS_METATYPE_RG;
- rgd->rd_rg.rg_header.mh_format = GFS_FORMAT_RG;
- rgd->rd_rg.rg_free = rgd->rd_ri.ri_data;
- gfs_rgrp_out(&rgd->rd_rg, BH_DATA(rgd->rd_bh[x]));
+ if (x) {
+ struct gfs_meta_header mh;
+
+ memset(&mh, 0, sizeof(mh));
+ mh.mh_magic = GFS_MAGIC;
+ mh.mh_type = GFS_METATYPE_RB;
+ mh.mh_format = GFS_FORMAT_RB;
+ gfs_meta_header_out(&mh,
+ BH_DATA(rgd->rd_bh[x]));
+ } else {
+ memset(&rgd->rd_rg, 0,
+ sizeof(struct gfs_rgrp));
+ rgd->rd_rg.rg_header.mh_magic = GFS_MAGIC;
+ rgd->rd_rg.rg_header.mh_type =
+ GFS_METATYPE_RG;
+ rgd->rd_rg.rg_header.mh_format =
+ GFS_FORMAT_RG;
+ rgd->rd_rg.rg_free = rgd->rd_ri.ri_data;
+ gfs_rgrp_out(&rgd->rd_rg,
+ BH_DATA(rgd->rd_bh[x]));
+ }
write_buf(sdp, rgd->rd_bh[x], BW_WAIT);
}
}
next reply other threads:[~2007-05-04 13:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-04 13:45 rpeterso [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-05-04 13:43 [Cluster-devel] cluster/gfs/gfs_fsck rgrp.c rpeterso
2007-05-04 13:34 rpeterso
2007-05-04 13:32 rpeterso
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070504134518.28676.qmail@sourceware.org \
--to=rpeterso@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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 NNTP newsgroup(s).