- add some project info for the main readme
- migrate readmes to markdown for improved formatting
- The main binary now requires the Rust toolchain, so make note of it
in the build instructions.
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
This implements BtreeNodeIter, and adds it to cmd_list.rs - the next
step in having a full replacement for cmd_list.c
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This implements opt_set!(), which works exactly the same as the C
version and allows filesystem options to be specified in Rust code.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Implement a rust equivalent to bkey_s_c, which uses references with the
correct lifetimes: now cmd_list.rs doesn't need unsafe.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This is a _very_ preliminary rewrite of the cmd_list tool in rust, which
is intended to be a testing ground for a safe interface in Rust to the
core btree interface. This adds rust wrappers for:
bch_fs: provides bch2_fs_open(), bch2_fs_stop
btree_trans: provides bch2_trans_init(), bch2_trans_exit()
btree_iter: provides peek, peek_and_restart, advance
bch_errcode: implements Display (wraps bch2_err_str())
bpos: implements Ord (wraps bpos_cmp())
bkey_s_c: implements Display (wraps bch2_bkey_val_to_text())
and other assorted types.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
- passing of arguments from c -> rust code now works correctly
- 'bcachefs mount' now handles being passed a device or devices
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Rust is now required for building the bcachefs tool, and rust code is
now fully integrated with the C codebase - meaning it is possible to
call back and forth.
The mount helper is now a subcommand, 'mount.bcachefs' is now a small
shell wrapper that invokes 'bcachefs mount'.
This will make it easier to start rewriting other subcommands in rust,
and eventually the whole command line interface.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
cpu_relax() is supposed to be a compiler barrier - this fixes a bug with
btree_write_buffer_flush() getting stuck.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Instead of having to use grep, this adds the ability to print out only
transactions that update a particular key, or to filter out entirely
keys except those updating certain btrees.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
remount is handled by libc, not the kernel mount procedure, this fixes
remounts. Also sorted the list of flags.
Signed-off-by: Daniel Hill <daniel@gluo.nz>
tracing framework is a overengineered for simple mount helper. Add a
few very barebone logging macros to allow configurable verbosity and
colorized output with a small footprint.
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
- add support for fstab format, UUID=<uuid>
- structopt is no longer actively maintained, replace with clap v4
which support everything structopt can and more.
- update dependencies
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
This changes the default version for the format command to be the
currently supported version, via
/sys/modules/bcachefs/parameters/version.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>