[VDO-6064] dm vdo test: fix torn write tests#435
Merged
lorelei-sakai merged 2 commits intodm-vdo:mainfrom Apr 1, 2026
Merged
Conversation
bjohnsto
requested changes
Mar 30, 2026
Pass dory-specific parameters to dory devices when they are created. This is generalized to allow passing parameters specific to other device types as well, although that features is not currently used by any other device types. This change makes the torn write tests once again function the way they were intended, by allowing the tests to set the blockSize and cacheBlocks parameters on their dory devices again. Also refactor the parameter collection slightly to make clear that the provided extra parameters will override any other parameters. Signed-off-by: Matthew Sakai <msakai@redhat.com>
Remove calls to dm_submit_bio_remap() and replace them with
calls to submit_bio_noacct(). I believe this change was
copied from similar upstream changes such as a92512819b1f
("dm thin: use dm_submit_bio_remap"), without realizing
that dm_submit_bio_remap() can only be used with cloned
bios. Due to the test issues around dory parameter setting,
I believe that we have never actually used this code since
it was added. (This effectivey reverts the change that
added this call around four years ago.)
Also fix a few parameters so that cache bios can contain a
data page (so that bio_add_page() will succeed), and replace
the bio offset calculation with the offset_in_page() macro.
(The calculation is identical.)
Signed-off-by: Matthew Sakai <msakai@redhat.com>
24340b7 to
3c0b3c7
Compare
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.
Pass dory-specific parameters to dory devices when they are created. This is generalized to allow passing parameters specific to other device types as well, although that features is not currently used by any other device types.
This change makes the torn write tests once again function the way they were intended, by allowing the tests to set the blockSize and cacheBlocks parameters on their dory devices again. Then, fix the dory cache bio handling to actually be able to send bios to the underlying device correctly. This makes the torn write tests pass again even with the cache enabled.
Also added some minor refactoring to clarify the code a bit.