Brian Foster 83bc15eefe bcachefs-tools: fix broken libblkid superblock wipe
When playing around with comparing some fstests results on different
filesystems, I noticed that a 'bcachefs format' of a previously
btrfs-formatted device still continued to mount as btrfs. The reason
for this is that the blkid wipe invoked via open_for_format() is not
working correctly. blkid_do_wipe() depends on the "SBMAGIC[_OFFSET]"
values to do any work, and the associated superblock magic flag is
not enabled on the probe.

Set the probe flags to explicitly enable the values the bcachefs
code depends on in the probe. This includes the type, label and
superblock magic information.

There are also a couple quirks in the libblkid code that might be
worth noting. One is that the superblock enablement and flag setting
functions appear hardcoded to return zero, so we just combine the
error checks. Second, while blkid_do_wipe() can return an error, it
actually doesn't in the scenario being addressed here because it
doesn't seem to distinguish between the values being absent because
nothing was found by the probe or because the values weren't enabled
in the first place. Regardless, add an error check here in the event
the wipe does explicitly fail for some unexpected reason.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-17 15:09:27 -05:00
2023-08-11 18:32:23 -04:00
2018-11-23 02:10:44 -05:00
2023-11-16 17:54:06 -05:00
2022-03-24 11:41:10 -06:00
2023-01-03 16:58:55 +13:00
2023-03-08 21:00:51 +01:00
2022-05-26 15:40:08 -04:00
2023-06-10 20:59:22 -04:00
2023-07-20 18:11:51 -04:00
2023-11-06 19:06:34 -05:00
2023-11-16 17:54:06 -05:00
2016-03-11 21:18:42 -09:00
2013-07-17 13:13:31 -07:00
2023-11-09 23:13:43 +01:00
2023-08-04 20:13:38 +02:00
2017-03-09 09:14:11 -09:00
2023-03-07 12:46:53 -05:00

bcachefs-tools

Userspace tools and docs for bcachefs

Bcachefs is an advanced new filesystem for Linux, with an emphasis on reliability and robustness and the complete set of features one would expect from a modern filesystem.

This repo primarily consists of the following:

  • bcachefs tool, the reason this repo exists.
  • {mkfs,mount,fsck}.bcachefs utils, which is just wrappers calling the corresponding subcommands in the main tool
  • docs in the form of man-pages and a user manual

Please refer to the main site for getting started An in-depth user manual is (also) found on the official website

Build and install

Refer to INSTALL.md

Bug reports and contributions

Description
Languages
C 95.6%
C++ 2%
Rust 1.4%
Roff 0.4%
Nix 0.2%
Other 0.4%