Commit Graph

53 Commits

Author SHA1 Message Date
Kent Overstreet
f76d246fff Update bcachefs sources to 1a739db0b256 bcachefs; guard against overflow in btree node split
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-18 23:21:21 -05:00
Kent Overstreet
cc902bb4bf cmd_format: Check for device options after device arguments
It's a common user error to specify device specific options at the end
of a format command, and then not have them apply to any devices - add a
check for this.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-06 19:02:40 -05:00
Kent Overstreet
37ee7f0591 Update, slim down rust dependencies
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-02 16:44:59 -04:00
Kent Overstreet
6a34032417 Update bcachefs sources to a180af9dd349 bcachefs: Refactor memcpy into direct assignment
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-10-18 22:14:53 -04:00
Hunter Shaffer
9f98746bfc Change open_for_format to the block io api
Upcoming patch will add device benchmarking at format time, which needs
the bio API.

Signed-off-by: Hunter Shaffer <huntershaffer182456@gmail.com>
2023-10-08 21:06:07 -04:00
Kent Overstreet
1251ea58a8 Update bcachefs sources to 7bf1ac0d46 bcachefs: Correctly initialize new buckets on device resize
Signed-off-by: Hunter Shaffer <huntershaffer182456@gmail.com>
2023-10-08 21:06:07 -04:00
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
1eae1d718c Use bch2_err_str() instead of strerror()
This correctly prints out our private error codes.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-12-19 16:05:54 -05:00
Kent Overstreet
6ac37db841 Update bcachefs sources to 24f7e08cd8 bcachefs: shrinker.to_text() methods 2022-06-09 15:07:25 -04:00
Kent Overstreet
62839683e8 Update email address
This changes linux-bcache@vger.kernel.org references to the correct
mailing list (linux-bcachefs@vger.kernel.org).

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-05-26 15:40:08 -04:00
Kent Overstreet
6f5afc0c12 Update bcachefs sources to bdf6d7c135 fixup! bcachefs: Kill journal buf bloom filter 2022-05-02 18:42:06 -04:00
Kent Overstreet
e240b4ae86 Update bcachefs sources to f638850417 bcachefs: bch2_trans_log_msg() 2022-03-30 17:40:37 -04:00
Kent Overstreet
f3cdace86c cmd_format: verbose no longer on by default
Instead, we now have a -v option

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-03-22 14:08:40 -04:00
Kent Overstreet
8c60ee37e7 Make filesystem initialization verbose
Initializing the freespace btree may take some time, so let's make that
visible.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-03-10 15:37:27 -05:00
Aleksei Kharlamov
b1a2ab6eef Heap-allocate printbufs
Signed-off-by: Aleksei Kharlamov <aleksei@devass.club>
2022-02-26 21:31:27 +01: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
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
07ec713e05 Update bcachefs sources to 1a510b00b6 bcachefs: Increase BTREE_TRANS_MEM_MAX 2021-07-04 23:33:54 -04:00
Kent Overstreet
fe1bb39aa5 Fix format args to die()
Also, add the format attribute so we get warnings about this.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-06-14 20:28:26 -04: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
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
Justin Husted
37899250f3 Fix memory leak in cmd_format.c
Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-03 23:17:43 -05:00
Kent Overstreet
3a59ff72a0 initialize filesystem when formatting
makes it possible to mount ro for the first mount, helps with some
xfstests tests
2019-04-06 17:45:19 -04:00
Tim Schlueter
287db5472d Fix format -g to create a disk group 2019-01-13 18:53:37 -08:00
Kent Overstreet
5f7dd4b4b2 Fix target options 2019-01-13 14:15:01 -05:00
Kent Overstreet
6892dcbcc0 readd -q (--quiet) 2019-01-03 10:23:42 -05:00
Kent Overstreet
0e9822571c Use opts.h for format options 2018-12-19 18:27:57 -05:00
Tim Schlueter
f2665657cf Fixed format args and removed unnecessary strdup()s 2018-11-04 23:23:11 -08: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
Leah Neukirchen
e523a844d6 format: the error_action readonly is spelled remount_ro 2018-02-09 20:51:23 +01:00
Leah Neukirchen
a502eb5094 format: document -U (used by many mkfs.*) 2018-02-09 19:21:47 +01:00
Kent Overstreet
7875b82630 New data rereplicate command 2018-02-08 15:33:43 -05:00
Kent Overstreet
4de98a2712 Update bcachefs sources to 02ae70070a bcachefs: Allocate new btree roots lazily 2018-01-11 07:02:08 -05:00
Kent Overstreet
dbad1685bc show-super can now print more stuff 2017-12-29 21:15:47 -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
a95883db43 add --replicas 2017-12-02 06:04:16 -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
e004b95b88 fix sync writes - don't use O_EXCL 2017-05-05 00:27:50 -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
5ec39af8ea Rename from bcache-tools to bcachefs-tools 2017-03-19 17:31:47 -08:00
Kent Overstreet
d4e6736e59 Add --quiet to cmd_format 2017-03-14 11:47:09 -08:00
Kent Overstreet
d252e12acc Refactoring for device specific commands 2017-03-12 06:53:43 -08:00
Kent Overstreet
07ddcf0bef cmd_device_add improvements 2017-03-09 09:26:56 -09:00
Kent Overstreet
ac1b32acb4 cmd_device_fail
Add a comamnd for setting a device as failed, update bcache sources
2017-03-09 09:14:11 -09:00