Commit Graph

42 Commits

Author SHA1 Message Date
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
a29cb4b9f8 cmd_device_set_state: use buffered IO for writing superblock
The layout may be unaligned on 4k sector devices - but there's no reason
we need to use direct IO here.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-11 23:06:17 -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
Daniel B. Hill
a6390a8012 fix labels not applying
Signed-off-by: Daniel B. Hill <daniel@gluo.nz>
2022-01-01 21:14:28 -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
2fc5a50bd6 Fix device add for kernel sysfs changes
Also slightly improve some error messages

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-12-10 14:07:31 -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
Brett Holman
9a649545a3 Add more specific subcommand usage messages
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>
2021-11-01 08:12:35 -06:00
Chris Webb
f5c0b67603 Cosmetic fixes for device resize-journal
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>
2021-10-24 11:39:36 -04:00
Kent Overstreet
beb0846724 Print better error message when shrinking is attempted
Shrinking's not supported yet.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-09-30 17:15:29 -04:00
Kent Overstreet
816ec60516 Add --force-if-data-lost to bcachefs device set-state
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-04-09 17:42:26 -04:00
Kent Overstreet
f46437f06e bcaachefs device set-state can now work by id 2021-04-02 23:35:05 -04:00
Kent Overstreet
aa0ddf3cf9 Update bcachefs sources to 242d37cbd0 bcachefs: Kill btree_iter_pos_changed() 2021-03-16 21:46:18 -04:00
Kent Overstreet
9e5d774875 Update bcachefs sources to e2b8120595 bcachefs: Use x-macros for more enums 2021-02-20 22:34:09 -05:00
Kent Overstreet
41dc1733f1 Fix bcachefs device remove --by-id
That's not how you parse an integer in C...

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-01-05 15:02:10 -05: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
024a01bf07 Add --offline to device set-state 2020-05-08 21:25:25 -04:00
Kent Overstreet
6e9f460240 Set device read-only if necessary before evacuate 2020-04-25 16:42:09 -04:00
Stijn Tintel
e57c053797 cmd_device_remove: allow removal by device id
If a disk is absent, there is no way to remove it from the filesystem.
Add the possibility to remove devices by id, to allow removal of missing
disks.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2019-08-16 21:07:32 +03:00
Kent Overstreet
9b08492bc7 check if fs is mounted before running fsck 2019-03-24 21:07:45 -04:00
Kent Overstreet
0e9822571c Use opts.h for format options 2018-12-19 18:27:57 -05:00
Stijn Tintel
0268bec14b cmd_device_add: replace tier with group in usage
Tiering has been replaced by disk groups, but the usage message for
cmd_device_add was never updated to reflect this change. Replace the
tier option with group to fix the usage message.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-10-08 18:27:18 -04:00
Stijn Tintel
8c310c8593 cmd_device: add missing short options to usage
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-10-08 18:27:14 -04:00
Kent Overstreet
cdf17bffad disk groups 2018-02-19 19:01:07 -05:00
Leah Neukirchen
0feb77e79e device add: support --help 2018-02-09 19:17:26 +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
Kent Overstreet
aca9f96dcc Resizing 2017-12-28 02:55:08 -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
bf8c59996b Update for new superblock options; makefile improvements 2017-10-08 10:25:36 -08:00
Kent Overstreet
851e945db8 Update for sysfs changes 2017-06-13 15:53:11 -08:00
Kent Overstreet
5c7454176e cmd_list improvements; use %m 2017-04-14 20:40:50 -08:00
Kent Overstreet
2615d73a74 Allow disk commands to specify member by index 2017-04-05 18:20:50 -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
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
Kent Overstreet
a17f7bcec7 cmd_migrate 2017-03-09 09:14:11 -09:00
Kent Overstreet
a5b5eba7f7 New on disk format - encryption 2017-02-28 03:05:38 -09:00
Kent Overstreet
5933f9478c update bcache code, fsck improvements 2017-02-06 20:45:37 -09:00