eb2dc99 GFS2: gfs2_edit savemeta doesn't work with GFS

Authored and Committed by rpeterso 15 years ago
    GFS2: gfs2_edit savemeta doesn't work with GFS
    
    bz 471239
    
    This patch fixes several problems when saving and restoring
    GFS and GFS2 metadata when the block size is not the default
    of 4K.  Some of the problems fixed:  (1). GFS and GFS2 have
    different starting offsets and lengths for indirect block
    pointers.  This required a number of code adjustments.
    (2). The journal index information is kept differently in GFS,
    so I had to change how the journal index buffers were managed.
    (3). The GFS dinode structure is slightly different from GFS2
    and that was throwing off calculations because the di_height
    value was in the wrong location.  Smaller block sizes made it
    worse (more blocks and a bigger height required for the same
    information).  (4) GFS1 indirect pointer blocks look like
    metadata whereas GFS2's do not.  As a result, gfs2_edit was
    improperly truncating those blocks for GFS1 (trying to avoid
    capturing user data versus metadata).
    
        
file modified
+31 -0
file modified
+47 -0
file modified
+101 -15