nixos has trouble with the shell script wrappers - readlink isn't
available by default!
But, there's a better approach: just get rid of them and use symlinks
instead, and have main() check what we're supposed to be.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
For systems without working rust/llvm/bindgen, add an option for
building without Rust. This will be less of an option in the future, as
more code gets rewritten in Rust.
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>
The device, data, fs, and subvolume subcommands currently print out a
generic usage message. Make these more specific.
Signed-off-by: Brett Holman <bholman.devel@gmail.com>
Correct the operation name from 'journal-resize' to 'resize-journal' in the
bcachefs usage summary, matching the command that is actually implemented.
Fix the size argument so it isn't optional. Defaulting to the entire device
makes sense for 'device resize', to automatically expand the fs to fill the
block device. However, it is never meaningful (or possible) to expand the
journal to the full disk.
Signed-off-by: Chris Webb <chris@arachsys.com>
This is in preparation of adding the resize-journal command to the main
help text, which would otherwise break the alignment.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This adds a new subcommand, bcachefs data job, that gives more direct
access to the data job/ioctl functionality, and hooks up the new rewrite
old nodes data job.
The experimental fuse3 support is not complete yet, and fuse3 is new and
still difficult to install on some platforms.
Make it optional at compile time, and default to off.
Signed-off-by: Justin Husted <sigstop@gmail.com>