Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fat bin using the block --buffered arg for connect #75

Merged
merged 1 commit into from May 15, 2018

Conversation

ricarkol
Copy link
Contributor

@ricarkol ricarkol commented Apr 21, 2018

mirage-block-unix.2.5.0 has an arg to specify the use of unbuffered IO (O_DIRECT flag on open) on connect, an optional --buffered. This change uses that instead of the current appending of "buffered:" in front of the file name. This fixes #64.

Also, was looking at mirage-block-solo5, and it doesn't implement the --buffered arg. The fat bin tool uses block-unix, so that's good, but we should really implement that arg in solo5.

Test:

[ocaml-fat]$ strace ./_build/install/default/bin/fat list --unbuffered test/fat.dat 2>&1 | grep open
...
open("test/fat.dat", O_RDWR|O_DIRECT)   = 4

[ocaml-fat]$ strace ./_build/install/default/bin/fat list test/fat.dat 2>&1 | grep open
...
open("test/fat.dat", O_RDWR)            = 4

@samoht
Copy link
Member

samoht commented May 15, 2018

Thanks! I am merging this to unbreak mirage/fat on 4.06, but a proper review from @djs55 would be appreciated.

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.

can't create / connect to fat file on tmpfs
2 participants