Repository navigation
grainmedia, fullhan: migration completes with a flash-file - #212
Merged
Merged
Conversation
test-grainmedia.py's migration check ("and loaded back") failed about one
run in three, on master's CI too. The save never completed: switchover
reported "bdrv_inactivate_all() failed: -1", the stream stopped after RAM,
and whether the truncated stream then loaded depended on timing.
flash-file opens the image with blk_new_open() and hands that
BlockBackend to the flash device's drive property. The property takes
an anonymous BlockBackend by its node name and gives the device a new
BlockBackend on that node; the machine's own stayed, writable and
attached to no device, so blk_can_inactivate() refused it. The machines
now drop their reference once the device has its own. The device's
BlockBackend still writes the image back.
Over 72 saves under parallel load every load now succeeds (12 of 72
failed before), and query-migrate says completed.
PR Summary by QodoFix flash-file migration for Grain Media and Fullhan machines
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test-grainmedia.py's migration check ("and loaded back") fails intermittently, about one run in three. It fails onmastersince #208's CI passed, and it blocks #211.Cause: the save never completed. Switchover failed with
bdrv_inactivate_all() failed: -1, so the stream stopped after RAM, and whether the truncated stream loaded was down to timing.flash-fileopens the image withblk_new_open()and passes that BlockBackend to the flash device'sdriveproperty. The property refers to an anonymous BlockBackend by its node name and creates a new BlockBackend on that node for the device. The machine's original one stayed attached to the node, writable and with no device, soblk_can_inactivate()refuses it.Fix: the Grain Media and Fullhan machines drop their reference once the device has its own; the device's BlockBackend still writes the image back.
Testing:
query-migratenow reportscompleted.test-grainmedia.pyandtest-fullhan.pypass.