Skip to content

Fix VDI reads across allocation blocks - #89

Open
Tivian wants to merge 1 commit into
fox-it:mainfrom
Tivian:fix/vdi-multiblock-read
Open

Fix VDI reads across allocation blocks#89
Tivian wants to merge 1 commit into
fox-it:mainfrom
Tivian:fix/vdi-multiblock-read

Conversation

@Tivian

@Tivian Tivian commented Aug 16, 2026

Copy link
Copy Markdown

Fixes multi-block reads in VDIStream.

The existing read_len calculation always evaluates to the full remaining length. As a result, a read spanning multiple VDI blocks can continue reading linearly from the physical block selected for the first logical block, instead of consulting the VDI allocation map for each block.

Limit each iteration to the remainder of the current VDI block so subsequent blocks are mapped independently.

Adds a regression test using non-contiguous physical block mappings.

Tested with:

  • py -m tox -e py3 — 58 passed
  • py -m tox -e lint — passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant