Use the sector_size given by the block device via its info#5
Merged
Conversation
Julow
reviewed
Apr 26, 2022
Julow
left a comment
There was a problem hiding this comment.
With the unix backend, prefered_sector_size is respected when opening a regular file so different block sizes are not exercised in the tests.
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.
Instead to require a
block_sizeargument on theconnectfunction, the given block can help us to get such information viaBlock.get_info. By this way, we don't do a mistake on this parameter 👍 .mirage-block-unix(/cc @Julow) helps us with aprefered_sector_sizewhen we want to connect our block-device. By this way, I ensured that the behavior ofchamelonis pretty the same with a~block_size:512.Let me know about this PR - and I think you should have an access into
ocaml-cito get a proper CI in this repository.This PR mostly helps what it will be the
chamelondevice - see mirage/mirage#1300.