Skip to content

Use the sector_size given by the block device via its info#5

Merged
yomimono merged 1 commit into
yomimono:mainfrom
dinosaure:sector_size
Apr 29, 2022
Merged

Use the sector_size given by the block device via its info#5
yomimono merged 1 commit into
yomimono:mainfrom
dinosaure:sector_size

Conversation

@dinosaure
Copy link
Copy Markdown
Contributor

Instead to require a block_size argument on the connect function, the given block can help us to get such information via Block.get_info. By this way, we don't do a mistake on this parameter 👍 . mirage-block-unix (/cc @Julow) helps us with a prefered_sector_size when we want to connect our block-device. By this way, I ensured that the behavior of chamelon is pretty the same with a ~block_size:512.

Let me know about this PR - and I think you should have an access into ocaml-ci to get a proper CI in this repository.

This PR mostly helps what it will be the chamelon device - see mirage/mirage#1300.

Copy link
Copy Markdown

@Julow Julow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the unix backend, prefered_sector_size is respected when opening a regular file so different block sizes are not exercised in the tests.

@yomimono yomimono merged commit 5d8c610 into yomimono:main Apr 29, 2022
@dinosaure dinosaure deleted the sector_size branch April 29, 2022 19:54
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.

3 participants