Bug 623467

Summary: gfs2_edit: page down on rindex doesn't work
Product: Red Hat Enterprise Linux 6 Reporter: Robert Peterson <rpeterso>
Component: clusterAssignee: Robert Peterson <rpeterso>
Status: CLOSED DUPLICATE QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.1CC: adas, bmarzins, cluster-maint, dmair, lhh, rpeterso, swhiteho, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-04 20:25:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to fix the problem none

Description Robert Peterson 2010-08-11 20:31:07 UTC
Description of problem:
If you navigate to the rindex file in gfs2_edit, then display
the structures, page up and down no longer work.  They show
you the first rindex entry regardless.

Version-Release number of selected component (if applicable):
RHEL6.0

How reproducible:
Always

Steps to Reproduce:
1. gfs2_edit /dev/bob/bob
2. m<up><up>jm<down><down><down><down><down><down>j<page dn>
  
Actual results:
gfs2_edit - Global File System Editor (use with extreme caution)
Block #99330    (0x18402)     of 268435456 (0x10000000)(disk inode)
---------------- rindex file -------------------
RG index entries found: 32768.
RG #0
  ri_addr               17                        0x11
  ri_length             3                         0x3
  ri_data0              20                        0x14
  ri_data               40936                     0x9fe8
  ri_bitbytes           10234                     0x27fa
...

Expected results:
gfs2_edit - Global File System Editor (use with extreme caution)
Block #99330    (0x18402)     of 268435456 (0x10000000)(disk inode)
---------------- rindex file -------------------
RG index entries found: 32768.
RG #9
  ri_addr               106487              0x19ff7
  ri_length             1                   0x1
  ri_data0              106488              0x19ff8
  ri_data               8188                0x1ffc
  ri_bitbytes           2047                0x7ff
...

Additional info:
The data is there, and in fact, you can get to it by using the
non-interactive (-p) option: gfs2_edit -p rindex /dev/bob/bob

Comment 1 Robert Peterson 2010-08-11 21:03:22 UTC
Created attachment 438297 [details]
Patch to fix the problem

Here's the easy fix.  Also, I discovered a circumvention.
The problem does not occur if you display the extended data
from another structure first.  For example, display the
jindex first, then jump to the rindex.

Comment 2 David Mair 2010-09-27 19:15:03 UTC
Given that we have a patch for this and this is likely going to be seen in a situation where customers are going to be trying to fix a broken filesystem it would be good if we fixed this in a 6.0.z errata.  Having to work around this bug in the midst of a broken filesystem or filesystem recovery with a customer, over the phone, will start confusing matters.

Comment 3 Robert Peterson 2010-09-27 19:29:09 UTC
This bug is not serious enough to z-stream, in my opinion.
First of all, there is a circumvention given in the bugzilla,
and that is to first display metadata for jindex file, for
example.  Second, customers or anyone can print the entire
rindex by doing gfs2_edit -p rindex /dev/device.  Third, it's
unlikely that customers should be getting in to that much
of the nuts and bolts of their gfs2 file system.  It's not
that big of deal to push the patch to 6.0.z, but it seems like
we're starting to push trivial things in that shouldn't be.

Comment 5 Robert Peterson 2010-10-04 20:25:35 UTC
For bug #634623 I did a bunch of work to rearrange the code.
This patch is incompatible with those, since the affected
code was moved to another source file.  Therefore, I'm closing
this one as a duplicate of bug #634623 and I'll include the
revised patch with that bug record.

*** This bug has been marked as a duplicate of bug 634623 ***