We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It may be impossible to create a new lusf file on tmpfs because tmpfs doesn't support O_DIRECT. This issue makes cannyls(or frugalos) crash.
O_DIRECT
I checked the behavior of tmpfs by the following code:
#define _GNU_SOURCE #include <fcntl.h> #include <stdio.h> #include <errno.h> // errno #include <string.h> // strerror int main(int argc, char** argv) { int result = open("/tmp/foo.txt", O_CREAT | O_RDONLY | O_DIRECT); if (result == -1) { printf("%s\n", strerror(errno)); return -1; } printf("ok\n"); return 0; }
Then run:
$ gcc -o main main.c ; ./main Invalid argument
$ uname -a Linux quad 4.18.6-arch1-1-ARCH #1 SMP PREEMPT Wed Sep 5 11:54:09 UTC 2018 x86_64 GNU/Linux $ cargo -V cargo 1.30.0 (a1a4ad372 2018-11-02)
Make sure that /tmp is mounted as tmpfs.
/tmp
tmpfs
$ git clone https://github.com/frugalos/kanils.git $ cd kanils $ cargo run -- Create --storage /tmp/foo.lusf --capacity=1024 Finished dev [unoptimized + debuginfo] target(s) in 0.07s Running `target/debug/kanils Create --storage /tmp/foo.lusf --capacity=1024` passed data region size = 1024 thread 'main' panicked at ' EXPRESSION: FileNvm::create(opt.storage_path, total_size) ERROR: Other (cause; File exists (os error 17)) HISTORY: [0] at /home/shinnya/.cargo/registry/src/github.com-1ecc6299db9ec823/cannyls-0.9.1/src/nvm/file.rs:163 [1] at src/main.rs:212
The text was updated successfully, but these errors were encountered:
I think this is a problem of KaNiLs rather than CannyLS: https://github.com/frugalos/kanils/blob/3fffa9a5641f4f5153f174264e3f88e35ad60ffe/src/main.rs#L212-L217
Sorry, something went wrong.
shinnya
No branches or pull requests
It may be impossible to create a new lusf file on tmpfs because tmpfs doesn't support
O_DIRECT
. This issue makes cannyls(or frugalos) crash.I checked the behavior of tmpfs by the following code:
Then run:
environment
how to reproduce
Make sure that
/tmp
is mounted astmpfs
.The text was updated successfully, but these errors were encountered: