qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug 1870098] Re: [block/vpc] cynamic disk header: off-by-one error for


From: Tobias Witek
Subject: [Bug 1870098] Re: [block/vpc] cynamic disk header: off-by-one error for "num_bat_entries"
Date: Thu, 02 Apr 2020 06:44:37 -0000

Ah, sorry, I failed to mention this: Due to this bug, qemu currently
cannot create VHDs that are suitable for upload to Azure (because Azure
expects disks that are aligned exactly to 1MB).

If it would not be too much trouble for you to submit the patch, I would
appreciate that a lot. I've never submitted a patch to qemu and the
contribution doc reads somewhat complex, so I'm a bit concerned about
dragging a very small patch out longer than strictly necessary.

Thanks a lot!

** Summary changed:

- [block/vpc] cynamic disk header: off-by-one error for "num_bat_entries"
+ [block/vpc] dynamic disk header: off-by-one error for "num_bat_entries"

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1870098

Title:
  [block/vpc] dynamic disk header: off-by-one error for
  "num_bat_entries"

Status in QEMU:
  New

Bug description:
  In current qemu versions (observed in 5.0.0-rc1 as well as
  2833ad487cfff7dc33703e4731b75facde1c561e), disk headers for dynamic
  VPCs are written with an incorrect "block allocation table entries"
  value.

  https://www.microsoft.com/en-us/download/details.aspx?id=23850 (the
  corresponding spec) states that:

  "Max Table Entries
  This field holds the maximum entries present in the BAT. This should be equal 
to the number of blocks in the disk (that is, the disk size divided by the 
block size)."

  Inside the qemu code, the value is "disk size divided by the block
  size *plus one*".

  Calculating "num_bat_entries" as "total_sectors/(block_size / 512)"
  *should* fix the issue.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1870098/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]