1b9e718 gfs2_convert: Use proper header size when reordering meta pointers

Authored and Committed by rpeterso 11 years ago
    gfs2_convert: Use proper header size when reordering meta pointers
    
    This patch changes function fix_metatree to use a proper metadata
    header size. Before, it was using sizeof(struct gfs2_meta_header).
    That's correct in almost all cases. But if you make a big file,
    such that it goes into height==2 (two levels of indirection), then
    truncate the file back to where it only would normally only need
    height==1, then run gfs2_convert, it gets into trouble. That's
    because you have a small file size, which calculates a much smaller
    number of GFS2 pointers needed, due to the truncation. Function
    fix_metatree will ensure at least one level of indirection by
    unstuffing the converted dinode, but we need to start pushing out
    the pointers onto the dinode's buffer, and for that, we need to
    calculate the right header size.
    
    rhbz#887374
    
        
file modified
+2 -1