Coder Social home page Coder Social logo

bento's People

Contributors

danyangz avatar smiller123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bento's Issues

Pass-through capability [Question]

Hi!
Wonderful project, congratulations!
Is it possible to have reads and writes be directly passed through bento to an underlying filesystem? That would be to allow for a fast stacked filesystem.

Cannot load file system modules

Hi! I am trying to set up Bento and I'm running into an issue where I can't load the included file system modules.

I've tried hello_ll, hello_ll2, xv6fs, and xv6fs2. I'm able to build bentofs, bento_utils, and the file system modules without any errors using the current nightly Rust version (1.60.0) after following the instructions in the README, and I can load the bentofs module with no issues. When I try to load one of the file system modules (e.g. hello_ll.ko), I get the following error:

insmod: ERROR: could not insert module kernel/hello_ll.ko: Invalid module format

dmesg contains this line: module: hello_ll: Unknown rela relocation: 29. I did a bit of googling, but unfortunately didn't find much; this issue was the closest to what I'm seeing, but their fix doesn't seem to be applicable here.

I am trying to run Bento on Ubuntu 20.04 with Linux kernel version 5.1.0. I ported the bentofs module and both the master and tcp_support branches to this version. I plan to try kernel 4.15 to see if it's an issue with my port or 5.1.0 in general, although ideally I'd like to stick with 5.1.0.

I've used both the current Rust nightly version (1.60.0) and nightly-1.43.0, since that appears to be the version that Bento was developed on. Unfortunately, I'm experiencing issues with 1.43.0; bento_utils compiles just fine, but attempting to compile hello_ll gives several errors of the following form:

error[E0658]: use of unstable library feature 'str_strip': newly added
  --> /home/hayley/.cargo/registry/src/github.com-1ecc6299db9ec823/clang-sys-1.3.0/build/dynamic.rs:93:51
   |
93 |     let version = if let Some(version) = filename.strip_prefix("libclang.so.") {
   |                                                   ^^^^^^^^^^^^
   |
   = note: see issue #67302 <https://github.com/rust-lang/rust/issues/67302> for more information
   = help: add `#![feature(str_strip)]` to the crate attributes to enable

I tried adding #![feature(str_strip)] to various lib.rs files with no luck. I suspect that this error might be due to some kind of version issues that might be tricky to fix.

Have any of these issues been encountered before?

Thanks in advance for your help!

clang: error: unsupported option '-mrecord-mcount' for target 'x86_64-pc-linux-gnu'

Using ubuntu 18.04 on VirtualBox, and bentofs in linux5.4 branch, could not compile.

How to avoid this unsupported option '-mrecord-mcount'?

chris@chris-ubuntu:~/dev/bento/hello_ll2/rust/kernel$ env -u MAKE -u MAKEFLAGS cargo build -Z build-std=core,alloc --release --target=x86_64-unknown-none-linuxkernel
   Compiling bento v0.1.0 (/home/chris/dev/bento/bento/rust)
error: failed to run custom build command for `bento v0.1.0 (/home/chris/dev/bento/bento/rust)`

Caused by:
  process didn't exit successfully: `/home/chris/dev/bento/hello_ll2/rust/kernel/target/release/build/bento-1cc5f8963743a1b8/build-script-build` (exit status: 1)
  --- stdout
  build.rs running
  cargo:rerun-if-env-changed=KDIR
  cargo:rerun-if-env-changed=CLANG
  cargo:rerun-if-changed=kernel-cflags-finder/Makefile

  --- stderr
  kernel-cflags-finder did not succeed
  stdout: -nostdinc -isystem /usr/lib/llvm-10/lib/clang/10.0.0/include /usr/lib/llvm-10/lib/clang/10.0.0/include -I/usr/src/linux-headers-5.13.0-44-generic/./arch/x86/include -I/usr/src/linux-headers-5.13.0-44-generic/./arch/x86/include/generated -I/usr/src/linux-headers-5.13.0-44-generic/./include -I/usr/src/linux-headers-5.13.0-44-generic/./arch/x86/include/uapi -I/usr/src/linux-headers-5.13.0-44-generic/./arch/x86/include/generated/uapi -I/usr/src/linux-headers-5.13.0-44-generic/./include/uapi -I/usr/src/linux-headers-5.13.0-44-generic/./include/generated/uapi -include /usr/src/linux-headers-5.13.0-44-generic/include/linux/compiler-version.h -include /usr/src/linux-headers-5.13.0-44-generic/include/linux/kconfig.h -I/usr/src/linux-headers-5.13.0-44-generic/ubuntu/include -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -no-integrated-as --prefix=/usr/bin/ -Werror=unknown-warning-option -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -mno-80387 -mstack-alignment=8 -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mretpoline-external-thunk -fno-jump-tables -fno-delete-null-pointer-checks -Wno-address-of-packed-member -O2 -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -gdwarf-4 -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -fno-strict-overflow -fno-stack-check -Werror=date-time -Wno-unknown-warning-option -DMODULE

  stderr: clang: warning: /usr/lib/llvm-10/lib/clang/10.0.0/include: 'linker' input unused [-Wunused-command-line-argument]
  clang: error: unsupported option '-mrecord-mcount' for target 'x86_64-pc-linux-gnu'
  make[2]: *** [scripts/Makefile.build:281: /home/chris/dev/bento/bento/rust/kernel-cflags-finder/dummy.o] Error 1
  make[1]: *** [Makefile:1879: /home/chris/dev/bento/bento/rust/kernel-cflags-finder] Error 2
  make: *** [Makefile:35: all] Error 2

chris@chris-ubuntu:~/dev/bento/hello_ll2/rust/kernel$ uname -r
5.13.0-44-generic
chris@chris-ubuntu:~/dev/bento/hello_ll2/rust/kernel$ cd ../../../bentofs/
chris@chris-ubuntu:~/dev/bento/bentofs$ git branch
* linux5.4
  master

compilation error

After git cloning the project on a linux env, a "make" inside "bentofs" directory fails. I wonder what should be changed here:

chrislu@chrislu-VirtualBox:~/dev/bento$ ls -al
total 84
drwxrwxr-x 15 chrislu chrislu 4096 Jan 28 00:57 .
drwxrwxr-x  5 chrislu chrislu 4096 Jan 18 23:52 ..
drwxrwxr-x  3 chrislu chrislu 4096 Jan 18 23:52 bento
drwxrwxr-x  2 chrislu chrislu 4096 Jan 28 01:17 bentofs
drwxrwxr-x  3 chrislu chrislu 4096 Jan 18 23:52 bento_utils
drwxrwxr-x  5 chrislu chrislu 4096 Jan 18 23:52 datablock-rs
drwxrwxr-x  9 chrislu chrislu 4096 Jan 18 23:52 .git
-rw-rw-r--  1 chrislu chrislu 4628 Jan 18 23:52 .gitlab-ci.yml
-rw-rw-r--  1 chrislu chrislu  192 Jan 18 23:52 .gitmodules
drwxrwxr-x  3 chrislu chrislu 4096 Jan 18 23:52 hello_client
drwxrwxr-x  3 chrislu chrislu 4096 Jan 18 23:52 hello_ll
drwxrwxr-x  3 chrislu chrislu 4096 Jan 18 23:52 hello_ll2
drwxrwxr-x  3 chrislu chrislu 4096 Jan 18 23:52 hello_srv
-rw-rw-r--  1 chrislu chrislu  337 Jan 18 23:52 LICENSE
-rw-rw-r--  1 chrislu chrislu 5017 Jan 18 23:52 README.md
drwxrwxr-x  2 chrislu chrislu 4096 Jan 28 00:57 .vscode
drwxrwxr-x  4 chrislu chrislu 4096 Jan 18 23:52 xv6fs
drwxrwxr-x  3 chrislu chrislu 4096 Jan 18 23:52 xv6fs2
drwxrwxr-x  5 chrislu chrislu 4096 Jan 18 23:52 xv6fs_prov
chrislu@chrislu-VirtualBox:~/dev/bento$ cd bentofs/
chrislu@chrislu-VirtualBox:~/dev/bento/bentofs$ make
make -C /lib/modules/5.11.0-46-generic/build M=/home/chrislu/dev/bento/bentofs modules
make[1]: Entering directory '/usr/src/linux-headers-5.11.0-46-generic'
  CC [M]  /home/chrislu/dev/bento/bentofs/dir.o
/home/chrislu/dev/bento/bentofs/dir.c: In function ‘bento_create_open’:
/home/chrislu/dev/bento/bentofs/dir.c:452:8: error: too many arguments to function ‘finish_open’
  452 |  err = finish_open(file, entry, generic_file_open, opened);
      |        ^~~~~~~~~~~
In file included from /home/chrislu/dev/bento/bentofs/bento_i.h:16,
                 from /home/chrislu/dev/bento/bentofs/dir.c:11:
./include/linux/fs.h:2553:12: note: declared here
 2553 | extern int finish_open(struct file *file, struct dentry *dentry,
      |            ^~~~~~~~~~~
/home/chrislu/dev/bento/bentofs/dir.c: In function ‘bento_atomic_open’:
/home/chrislu/dev/bento/bentofs/dir.c:491:13: error: ‘FILE_CREATED’ undeclared (first use in this function); did you mean ‘FUSE_CREATE’?
  491 |  *opened |= FILE_CREATED;
      |             ^~~~~~~~~~~~
      |             FUSE_CREATE
/home/chrislu/dev/bento/bentofs/dir.c:491:13: note: each undeclared identifier is reported only once for each function it appears in
/home/chrislu/dev/bento/bentofs/dir.c: In function ‘create_new_entry’:
/home/chrislu/dev/bento/bentofs/dir.c:565:8: error: implicit declaration of function ‘d_instantiate_no_diralias’ [-Werror=implicit-function-declaration]
  565 |  err = d_instantiate_no_diralias(entry, inode);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/chrislu/dev/bento/bentofs/dir.c: At top level:
/home/chrislu/dev/bento/bentofs/dir.c:1676:17: error: initialization of ‘int (*)(struct inode *, struct dentry *, struct file *, unsigned int,  umode_t)’ {aka ‘int (*)(struct inode *, struct dentry *, struct file *, unsigned int,  short unsigned int)’} from incompatible pointer type ‘int (*)(struct inode *, struct dentry *, struct file *, unsigned int,  umode_t,  int *)’ {aka ‘int (*)(struct inode *, struct dentry *, struct file *, unsigned int,  short unsigned int,  int *)’} [-Werror=incompatible-pointer-types]
 1676 |  .atomic_open = bento_atomic_open,
      |                 ^~~~~~~~~~~~~~~~~
/home/chrislu/dev/bento/bentofs/dir.c:1676:17: note: (near initialization for ‘bento_dir_inode_operations.atomic_open’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:288: /home/chrislu/dev/bento/bentofs/dir.o] Error 1
make[1]: *** [Makefile:1849: /home/chrislu/dev/bento/bentofs] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-46-generic'
make: *** [Makefile:5: all] Error 2

invoke from kernel makefile

Using branch 5.11, and cd bento/rust folder, cargo build suggested invoke from kernel makefile. Not very clear how to do that.

chrislu@chrislu-VirtualBox:~/dev/bento/bento/rust$ cargo build
   Compiling bento v0.1.0 (/home/chrislu/dev/bento/bento/rust)
error: failed to run custom build command for `bento v0.1.0 (/home/chrislu/dev/bento/bento/rust)`

Caused by:
  process didn't exit successfully: `/home/chrislu/dev/bento/bento/rust/target/debug/build/bento-117c02fd10b39823/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=CC
  cargo:rerun-if-env-changed=KDIR
  cargo:rerun-if-env-changed=c_flags

  --- stderr
  thread 'main' panicked at 'Must be invoked from kernel makefile: NotPresent', build.rs:387:39
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.