diff options
author | Jeff Cody <jcody@redhat.com> | 2013-10-30 10:44:49 -0400 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-11-07 13:58:59 +0100 |
commit | 0b7da092b40734538631c3ad461c1753a87535fc (patch) | |
tree | e8ca87c861263fb2f1748b7e8d24f282aec692b5 /block/vhdx.h | |
parent | d92aa8833c051b53d3bf2614ff885df0037f10bb (diff) |
block: vhdx - remove BAT file offset bit shifting
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: Jeff Cody <jcody@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/vhdx.h')
-rw-r--r-- | block/vhdx.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/block/vhdx.h b/block/vhdx.h index f3315480ea..d3598e0a27 100644 --- a/block/vhdx.h +++ b/block/vhdx.h @@ -229,7 +229,6 @@ typedef struct QEMU_PACKED VHDXLogDataSector { /* upper 44 bits are the file offset in 1MB units lower 3 bits are the state other bits are reserved */ #define VHDX_BAT_STATE_BIT_MASK 0x07 -#define VHDX_BAT_FILE_OFF_BITS (64 - 44) #define VHDX_BAT_FILE_OFF_MASK 0xFFFFFFFFFFF00000 /* upper 44 bits */ typedef uint64_t VHDXBatEntry; |