This moves the Rust sources out of rust_src/ and into the top level.
Running the bcachefs executable out of the development tree is now:
$ ./target/release/bcachefs command
or
$ cargo run --profile release -- command
instead of "./bcachefs command".
Building and installing is still:
$ make && make install
Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
* Add missing linux/stddef.h includes
* Explicitly cast PAGE_SIZE to size_t. PAGE_SIZE is defined without UL
suffix in musl
* Musl doesn't define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP, so
initialize the mutexes with pthread_once.
This is part of the userspace implementation of the kernel APIs for
bcachefs-tools. The previous implementation just provided a barrier, but
this isn't sufficient to make the associated percpu implementation safe.
Signed-off-by: Justin Husted <sigstop@gmail.com>