FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 01-20-2012, 02:09 PM
 
Default fsck.gfs2: fsck.gfs2: Ask to reclaim unlinked meta per-rgrp only

From: Bob Peterson <rpeterso@redhat.com>

Before this patch, fsck.gfs2 would ask for every unlinked metadata bit
whether you wanted to reclaim it as free space. This patch makes it
ask only once per resource group, and reports which resource group
so that the user doesn't think it's stuck in an infinite loop.

rhbz#675723
---
gfs2/fsck/initialize.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/gfs2/fsck/initialize.c b/gfs2/fsck/initialize.c
index 29e4560..08da24f 100644
--- a/gfs2/fsck/initialize.c
+++ b/gfs2/fsck/initialize.c
@@ -192,7 +192,7 @@ static void check_rgrp_integrity(struct gfs2_sbd *sdp, struct rgrp_list *rgd,
int *this_rg_bad)
{
uint32_t rg_free, rg_reclaimed;
- int rgb, x, y, off, bytes_to_check, total_bytes_to_check;
+ int rgb, x, y, off, bytes_to_check, total_bytes_to_check, asked = 0;
unsigned int state;

rg_free = rg_reclaimed = 0;
@@ -231,9 +231,17 @@ static void check_rgrp_integrity(struct gfs2_sbd *sdp, struct rgrp_list *rgd,
}
/* GFS2_BLKST_UNLINKED */
*this_rg_bad = 1;
- if (!(*fixit)) {
- if (query(_("Okay to reclaim unlinked "
- "inodes? (y/n)")))
+ if (!asked) {
+ char msg[256];
+
+ asked = 1;
+ sprintf(msg,
+ _("Okay to reclaim unlinked "
+ "inodes in resource group "
+ "%lld (0x%llx)? (y/n)"),
+ (unsigned long long)rgd->ri.ri_addr,
+ (unsigned long long)rgd->ri.ri_addr);
+ if (query("%s", msg))
*fixit = 1;
}
if (!(*fixit))
--
1.7.7.5
 

Thread Tools




All times are GMT. The time now is 09:42 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org