feat(vhd-lib/Vhd#{_getBatEntry,containsBlock}()): never throw (#3920)
Fix xoa-support#1214 Fix `createSyntheticStream` when the disk has been resize in the chain.
This commit is contained in:
parent
b7f20a963f
commit
ad01fcc880
@ -31,9 +31,11 @@
|
|||||||
- [VM creation] Broken CloudInit config drive when VM created on local SR
|
- [VM creation] Broken CloudInit config drive when VM created on local SR
|
||||||
- [Legacy Backup] Fix error when restoring a backup
|
- [Legacy Backup] Fix error when restoring a backup
|
||||||
- [Home] Fix `user.getAll` error when user is not admin [#3573](https://github.com/vatesfr/xen-orchestra/issues/3573) (PR [#3918](https://github.com/vatesfr/xen-orchestra/pull/3918))
|
- [Home] Fix `user.getAll` error when user is not admin [#3573](https://github.com/vatesfr/xen-orchestra/issues/3573) (PR [#3918](https://github.com/vatesfr/xen-orchestra/pull/3918))
|
||||||
|
- [Backup NG] Fix restore issue when a disk has grown (PR [#3920](https://github.com/vatesfr/xen-orchestra/pull/3920))
|
||||||
|
|
||||||
### Released packages
|
### Released packages
|
||||||
|
|
||||||
|
- vhd-lib v0.5.6
|
||||||
- xoa-updater v0.15.0
|
- xoa-updater v0.15.0
|
||||||
- xen-api v0.24.1
|
- xen-api v0.24.1
|
||||||
- xo-vmdk-to-vhd v0.1.6
|
- xo-vmdk-to-vhd v0.1.6
|
||||||
|
@ -216,7 +216,9 @@ export default class Vhd {
|
|||||||
|
|
||||||
// return the first sector (bitmap) of a block
|
// return the first sector (bitmap) of a block
|
||||||
_getBatEntry(block) {
|
_getBatEntry(block) {
|
||||||
return this.blockTable.readUInt32BE(block * 4)
|
const i = block * 4
|
||||||
|
const { blockTable } = this
|
||||||
|
return i < blockTable.length ? blockTable.readUInt32BE(i) : BLOCK_UNUSED
|
||||||
}
|
}
|
||||||
|
|
||||||
_readBlock(blockId, onlyBitmap = false) {
|
_readBlock(blockId, onlyBitmap = false) {
|
||||||
|
Loading…
Reference in New Issue
Block a user