Commit Graph

31 Commits

Author SHA1 Message Date
Kent Overstreet
0417560649 Get current metadata version from sysfs
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>
2022-12-21 21:41:34 -05:00
Kent Overstreet
e240b4ae86 Update bcachefs sources to f638850417 bcachefs: bch2_trans_log_msg() 2022-03-30 17:40:37 -04:00
Kent Overstreet
5528e3ae62 Update bcachefs sources to 9b3aa5ec6c bcachefs: Add tabstops to printbufs 2022-02-22 04:56:09 -05:00
Kent Overstreet
9cc3b7debb Unit handling cleanups
The option code has been switching to keeping things in display units -
bytes - and this transitions more libbcachefs.c code to bytes as well,
to match, and also fixes device add.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-01-01 21:14:22 -05:00
Kent Overstreet
07b18011cc Update bcachefs sources to f9d2e809a8 bcachefs: Turn encoded_extent_max into a regular option 2021-12-25 18:48:46 -05:00
Kent Overstreet
55e3496d06 Rename --group to --label
Disk labels used to be called groups - not all uses had been converted.
This renames --group to --label, and --label to --fs_label

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-12-10 13:32:35 -05:00
Kent Overstreet
8ba5e814fd Fix some small memory leaks
Found with -fsanitize=leak

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-04-16 17:28:40 -04:00
Kent Overstreet
f46437f06e bcaachefs device set-state can now work by id 2021-04-02 23:35:05 -04:00
Kent Overstreet
bb6eccc2ec Increase default superblock size to 1MB
Also - add an option to bcachefs format for specifying it,
--superblock_size

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-03-24 22:40:25 -04:00
Kent Overstreet
d3dc47271b Add format options for --no-initialize and specifying the metadata version
These are only to be used for tests.
2021-03-21 16:21:51 -04:00
Kent Overstreet
41bec63b26 Add a subcommand for resizing the journal
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2020-11-17 10:52:39 -05:00
Kent Overstreet
7d2baabdb1 Redo cmd_fs_usage for new ioctls 2019-12-18 16:11:11 -05:00
Kent Overstreet
07a0a5b5c4 Fix cmd_fs_usage for more than 4 devices
The ioctl returns -ERANGE when there's more devices than fit in the
buffer, not -ENOSPC

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-06-13 11:10:49 -04:00
Kent Overstreet
5f7dd4b4b2 Fix target options 2019-01-13 14:15:01 -05:00
Kent Overstreet
0e9822571c Use opts.h for format options 2018-12-19 18:27:57 -05:00
Kent Overstreet
3588fa621c fixes for 32 bit builds/non x86 archs 2018-05-17 02:36:19 -04:00
Kent Overstreet
6aabc97dc9 Add --durability to format 2018-03-13 03:23:27 -04:00
Kent Overstreet
8a57b1f1d5 minor disk group fixes;, add background_compression option 2018-02-28 17:57:55 -05:00
Kent Overstreet
cdf17bffad disk groups 2018-02-19 19:01:07 -05:00
Kent Overstreet
7875b82630 New data rereplicate command 2018-02-08 15:33:43 -05:00
Kent Overstreet
dbad1685bc show-super can now print more stuff 2017-12-29 21:15:47 -05:00
Kent Overstreet
aca9f96dcc Resizing 2017-12-28 02:55:08 -05:00
Kent Overstreet
5053c6ed25 fix default checksum types 2017-12-15 12:57:40 -05:00
Austin Seipp
997bb216aa build: require explicit include paths for libbcachefs/
This removes the implicit `-I libbcachefs` argument to $(CC), which in turn
requires a set of minor changes throughout the tools. There are two advantages
to this setup:

    1) It is (arguably) easier to read, since the location of bcachefs includes
    are easier to understand at a glance ("where does util.h live?")

    2) It removes the need for a hack to include glibc's copy of
    dirent.h explicitly via '/usr/include/dirent.h', because libbcachefs/
    *also* has a dirent.h file and the compiler cannot disambiguate them.
    This has some ramifications on systems where /usr/include may not
    exist, such as NixOS.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2017-12-10 16:06:01 -06:00
Kent Overstreet
3347339bbd Simple stupid memory reclaim code 2017-11-12 16:48:07 -05:00
Kent Overstreet
097fd2a5e6 Add commands for changing and removing passphrase 2017-11-08 16:06:37 -09:00
Kent Overstreet
bf8c59996b Update for new superblock options; makefile improvements 2017-10-08 10:25:36 -08:00
Kent Overstreet
e783d814e8 Update bcachefs sources to da037866e6 2017-04-09 20:12:37 -08:00
Kent Overstreet
2831b89a7c More cmd_migrate improvements
Factor out bch2_pick_bucket_size() from the format code, and pick the
bucket size before picking the superblock location - that way we can
ensure the superblock gets its own bucket and doesn't trigger warnings
due to the allocation code noticing different types of data in the same
bucket.
2017-04-02 19:43:35 -08:00
Kent Overstreet
c0ad33c126 bcachefs-in-userspace improvements
Got rid of the stupid shim file hack
2017-03-19 21:39:19 -08:00
Kent Overstreet
5ec39af8ea Rename from bcache-tools to bcachefs-tools 2017-03-19 17:31:47 -08:00