Skip to content

Add a --block configure flag for picking ramdisk or file-backed block…#800

Merged
yomimono merged 3 commits intomirage:masterfrom
g2p:master
Apr 26, 2017
Merged

Add a --block configure flag for picking ramdisk or file-backed block…#800
yomimono merged 3 commits intomirage:masterfrom
g2p:master

Conversation

@g2p
Copy link
Copy Markdown
Contributor

@g2p g2p commented Mar 3, 2017

… devices

@yomimono
Copy link
Copy Markdown
Contributor

yomimono commented Mar 3, 2017

Fixes #798 .

@g2p
Copy link
Copy Markdown
Contributor Author

g2p commented Mar 3, 2017

Hold on, my test case was off, the --block=ramdisk case isn't really building a ramdisk yet.

Edit: somehow main.ml doesn't get rebuilt every time.

@yomimono
Copy link
Copy Markdown
Contributor

yomimono commented Mar 3, 2017

@g2p: try https://github.com/yomimono/mirage/tree/blockier - the method name has to be unique among the classes, otherwise there can be strange collisions when Functoria reduces the graph (see mirage/functoria#79).

@g2p
Copy link
Copy Markdown
Contributor Author

g2p commented Mar 3, 2017

Thank you for digging this up!

I will revise this. There needs to be a way to specify the ramdisk size.

@g2p
Copy link
Copy Markdown
Contributor Author

g2p commented Apr 25, 2017

I've experimented with --block-size-sectors and --block-sector-size keys, but in the end, I think the size is best specified programmatically using Ramdisk.resize. Having flags that control the size in the ramdisk case and not in the block-file case would be confusing. Command-line flags also can't handle differing sizes for multiple devices.

So, please merge this branch as-is.

@yomimono
Copy link
Copy Markdown
Contributor

@g2p do you not need something like yomimono@b16848b ? I don't recall the specific surprising behavior we got with this patch or else I'd test myself.

@g2p
Copy link
Copy Markdown
Contributor Author

g2p commented Apr 25, 2017

@yomimono You're right, I had forgotten your patch when going back on my desktop.
The patch is necessary to pick the right module name near the top of the generated main.ml.
Thank you.

@yomimono yomimono merged commit 59e7e14 into mirage:master Apr 26, 2017
g2p added a commit to g2p/mirage that referenced this pull request Jun 16, 2017
g2p added a commit to g2p/mirage that referenced this pull request Jun 18, 2017
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.

2 participants