Skip to content
  • Jeff Cody's avatar
    block: vhdx - remove BAT file offset bit shifting · 0b7da092
    Jeff Cody authored
    
    
    Bit shifting can be fun, but in this case it was unnecessary.  The
    upper 44 bits of the 64-bit BAT entry is specifies the File Offset,
    so we shifted the bits to get access to the value.
    
    However, per the spec the value is in MB.  So we dutifully shifted back
    to the left by 20 bits, to convert to a true uint64_t file offset.
    
    This replaces those steps with just a bit mask, to get rid of the lower
    20 bits instead.
    
    Signed-off-by: default avatarJeff Cody <jcody@redhat.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    0b7da092