Bug 222743 - gfs_grow gets the rgindex out of order
Summary: gfs_grow gets the rgindex out of order
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gfs-utils
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Robert Peterson
QA Contact: GFS Bugs
URL:
Whiteboard:
Depends On:
Blocks: 222748
TreeView+ depends on / blocked
 
Reported: 2007-01-15 22:47 UTC by Robert Peterson
Modified: 2010-01-12 03:32 UTC (History)
2 users (show)

Fixed In Version: RHBA-2007-0576
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-07 17:57:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
RHEL5 patch to fix the problem (535 bytes, patch)
2007-01-17 19:09 UTC, Robert Peterson
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0576 0 normal SHIPPED_LIVE gfs-utils bug fix update 2007-10-30 15:36:03 UTC

Description Robert Peterson 2007-01-15 22:47:01 UTC
Description of problem:
When gfs_grow is run to extend a GFS file system, it adds entries
to the rgindex.  The problem is, it writes them in reverse block order.
That has the side-effect that gfs_fsck will report the wrong percentage
complete in pass 5.  For example, if you double the size of a GFS
file system, pass 5 will report 1% complete, then 2%, etc.  But when it
gets to the new rgs, it will report 99%, then 98%, then 97% until it
processes them all when it returns to 50%.

Version-Release number of selected component (if applicable):
RHEL5

How reproducible:
Always

Steps to Reproduce:
1. Create a small GFS file system
2. Use gfs_grow to grow it
3. Run gfs_fsck on it
  
Actual results:
Percentage complete can run backward.

Expected results:
Percentage complete should be forward.

Additional info:

Comment 1 Robert Peterson 2007-01-15 22:49:51 UTC
The problem is easily fixed.  Back in March 2006 when I was testing
changes to gfs_fsck rg repair, I noticed this problem and created 
this patch to fix it in RHEL4:

--- main.c.~1~  2005-01-04 04:07:07.000000000 -0600
+++ main.c      2006-03-30 11:18:34.000000000 -0600
@@ -669,7 +669,7 @@ make_rgrp(uint64_t offset, uint64_t size
        rgl->rg.rg_header.mh_format = GFS_FORMAT_RG;
        rgl->rg.rg_free = rgl->ri.ri_data;
 
-       osi_list_add(&rgl->list, &rglist_new);
+       osi_list_add_prev(&rgl->list, &rglist_new);
        return offset + size;
 }

The patch unfortunately never made it to RHEL5 or anywhere.  
This should be fixed so customers aren't confused by it.


Comment 3 Robert Peterson 2007-01-17 19:09:38 UTC
Created attachment 145848 [details]
RHEL5 patch to fix the problem

Comment 4 Robert Peterson 2007-01-17 19:13:47 UTC
Unit tested on trin-10: I used "gfs2_edit -p rgindex" to print the
rg index after the mkfs and after the gfs_grow.  The dump of the
rg index was bad before the fix and correct after the fix was applied
and the same commands were rerun to make and grow the file system.
Committed to CVS at HEAD and RHEL5 (not RHEL50).  Changing status to
modified.


Comment 5 Kiersten (Kerri) Anderson 2007-04-23 17:36:43 UTC
Fixing product name. Cluster Suite components were integrated into Enterprise
Linux for verion 5.0.

Comment 8 errata-xmlrpc 2007-11-07 17:57:42 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0576.html



Note You need to log in before you can comment on or make changes to this bug.