Commit Graph

37 Commits

Author SHA1 Message Date
Kent Overstreet
e142c4ca01 New subcommand: set-option
This is for setting superblock options on existing filesystems, either
online or offline.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-05-26 16:37:13 -04:00
Kent Overstreet
fa7a74fcc8 Delete some dead code
printf_pad() has been superseded by printbuf tabstops.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-05-26 16:30:57 -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
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
ad03173172 Update bcachefs sources to aa540d47ab bcachefs: Option improvements 2021-12-25 18:48:46 -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
jpsollie
d6415ce25b add a blk_wipe function call
Remove any possible filesystems left on the block device when formatting
this makes sure the automounter does not accidentally mount it as another filesystem.
one of the functionalities possibly wiped by accodent?

Signed-off-by: jpsollie <janpieter.sollie@edpnet.be>
2021-07-24 17:10:10 -04:00
Kent Overstreet
07ec713e05 Update bcachefs sources to 1a510b00b6 bcachefs: Increase BTREE_TRANS_MEM_MAX 2021-07-04 23:33:54 -04:00
jpsollie
0fbe294a96 Improve compiler compatibility + run blkid remove for all filesystems
add a blk_wipe function to remove any possible filesystems left on the block device
this makes sure the automounter does not accidentally mount it as another filesystem.

Signed-off by: Janpieter Sollie <janpieter.sollie@edpnet.be>
2021-06-13 01:09:56 -04:00
Kent Overstreet
cc92b0f5a2 New data job command
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.
2021-03-16 21:46:21 -04:00
Kent Overstreet
a9a46467e6 Assorted debug and fsck improvements
This adds a new list mode to "bcachefs list", for printing out nodes as
they exist on disk (before being merge sorted). Also some improvements
to fsck return values.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2020-08-24 16:26:22 -04:00
Kent Overstreet
7c39a1cf1b fs_usage cmd fixes
- Sort devices by device name if they don't have a label
- We were printing the wrong devices in the device list in the per-data
  entries
2020-01-03 19:33:05 -05:00
Justin Husted
c54ea51416 Make die exit using _exit
Exiting the standard way on error caused teardown in bad state problems.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-12-29 13:08:35 -08: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
Kent Overstreet
67fb317a07 improve dev_to_mount()
should fix a bug where resize does an offline resize when the fs was
mounted because it thought it wasn't mounted
2018-10-21 19:35:35 -04:00
Kent Overstreet
bb6f4111fb Update bcachefs sources to 9abf628c70 bcachefs: Fix a spurious error in fsck 2018-06-01 17:33:19 -04:00
Kent Overstreet
3588fa621c fixes for 32 bit builds/non x86 archs 2018-05-17 02:36:19 -04:00
Leah Neukirchen
0f85ced799 tools-util.c: define generic crc32c on non-x86_64 arch 2018-02-09 23:13:24 +01:00
Kent Overstreet
7875b82630 New data rereplicate command 2018-02-08 15:33:43 -05:00
Kent Overstreet
a9f5937a97 cmd_migrate fixes
when linking existing data, we weren't creating alloc btree keys - also,
we were calculating the wrong bucket...
2018-02-07 06:52:56 -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
30caf69540 Add bcachefs fs usage 2017-12-23 00:51:19 -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
e7c2bb91bc Faster crc32c 2017-10-08 10:20:36 -08:00
Kent Overstreet
e004b95b88 fix sync writes - don't use O_EXCL 2017-05-05 00:27:50 -08:00
Kent Overstreet
5c7454176e cmd_list improvements; use %m 2017-04-14 20:40:50 -08:00
Kent Overstreet
5ec39af8ea Rename from bcache-tools to bcachefs-tools 2017-03-19 17:31:47 -08:00
Kent Overstreet
07ddcf0bef cmd_device_add improvements 2017-03-09 09:26:56 -09:00
Kent Overstreet
a17f7bcec7 cmd_migrate 2017-03-09 09:14:11 -09:00
Kent Overstreet
d230eaea61 Add a command to dump filesystem metadata 2017-02-06 23:43:16 -09:00
Kent Overstreet
5933f9478c update bcache code, fsck improvements 2017-02-06 20:45:37 -09:00
Kent Overstreet
b33fc8298f bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00