Gitweb:
http://git.fedorahosted.org/git/gfs1-utils.git?p=gfs1-utils.git;a=commitd...
Commit: 60c67a969639d95e842c2e90a567f2c94689db70
Parent: 3f34656a829f464033c79d50e607e2936dd46030
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Fri Jan 8 12:59:04 2010 -0600
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Fri Jan 8 12:59:04 2010 -0600
gfs_fsck: Don't try to convert free_meta to free if -n was specified.
The code was checking free_meta blocks and counting them as errors
even if -n was specified on gfs_fsck. But free_meta blocks aren't
technically an error and gfs_fsck's converting them to free blocks
is a convenience, so if -n was specified, don't treat them as errors.
rhbz#508978
---
gfs/gfs_fsck/pass5.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/gfs/gfs_fsck/pass5.c b/gfs/gfs_fsck/pass5.c
index d8d0768..9916664 100644
--- a/gfs/gfs_fsck/pass5.c
+++ b/gfs/gfs_fsck/pass5.c
@@ -202,10 +202,11 @@ static int check_block_status(struct fsck_sb *sbp, char *buffer,
unsigned int bu
rg_status, block_status, q.block_type);
if((rg_status == GFS_BLKST_FREEMETA) &&
(block_status == GFS_BLKST_FREE)) {
- errors_found++;
- log_info("Converting free metadata block at %"
- PRIu64" to a free data block\n", block);
if(!sbp->opts->no) {
+ errors_found++;
+ log_info("Converting free metadata "
+ "block at %" PRIu64 " to a "
+ "free data block\n", block);
if(fs_set_bitmap(sbp, block, block_status)) {
log_warn("Failed to convert free metadata block to free data block at
%PRIu64.\n", block);
}
@@ -214,6 +215,9 @@ static int check_block_status(struct fsck_sb *sbp, char *buffer,
unsigned int bu
errors_corrected++;
}
}
+ /* If we have free_meta blocks but -n was
+ specified, we can't convert them. But it's
+ also not technically an error. */
}
else {
const char *blockstatus[] = {"Free", "Data",