eb10201 restoremeta: Fix unaligned access in restore_init()

Authored and Committed by andyp 3 years ago
    restoremeta: Fix unaligned access in restore_init()
    
    On sparc64 we get restoremeta tests failing with SIGBUS due to an
    unaligned access when scanning for the super block offset in the
    metadata file. memcpy the buffer into a gfs2_sb struct to avoid that. In
    most cases, if not always, this loop succeeds on the first iteration
    and might not even be needed, so the added overhead is minimal.
    
    Signed-off-by: Andrew Price <anprice@redhat.com>
    
        
file modified
+7 -7