mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-09 00:00:04 +03:00
This patch addresses build issues with bch_bindgen on architectures where the natural alignment of u64 is 4 instead of 8, such as i686 and ppc64. The issue arises from rustc's refusing to compile structs with a "packed" attribute that have members with an explicit "align(N)" attribute. rust-bindgen generally does not place "align(N)" attributes on types when it is redundant with the type's natural alignment. There are a few types in bcachefs with "__aligned(8)" in C where the type's natural alignment is 8 except on architectures like those mentioned above where it is 4. rust-bindgen places the "align(8)" attribute on these types, for those architectures. The affected types include: - bch_csum - bch_sb_layout - bch_ioctl_data_progress bch_ioctl_data_progress, and all types that depend on it, are not used on the Rust side currently and bindings are only generated for them because they are covered by `.allowlist_type("bch_.*")` in bch_bindgen/build.rs. This patch resolves the build failure for this type by excluding it from bch_bindgen. If/when accessing this type in Rust is needed, a decision can be made then about how to represent its layout in Rust. bch_csum and bch_sb_layout, and types that depend on them, are currently used in Rust so they can't be excluded. This patch addresses these types by stripping off the "packed" attribute in Rust on types that embed these types, since that attribute happens to not be necessary for proper layout. Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> |
||
---|---|---|
.github | ||
bch_bindgen | ||
c_src | ||
ccan | ||
debian | ||
doc | ||
fsck | ||
include | ||
initramfs | ||
libbcachefs | ||
linux | ||
packaging | ||
raid | ||
src | ||
tests | ||
udev | ||
.bcachefs_revision | ||
.editorconfig | ||
.gitignore | ||
bcachefs | ||
bcachefs.8 | ||
build.nix | ||
build.rs | ||
Cargo.lock | ||
Cargo.toml | ||
COPYING | ||
default.nix | ||
flake.lock | ||
flake.nix | ||
INSTALL.md | ||
make-release-tarball.sh | ||
Makefile | ||
Makefile.compiler | ||
mount.bcachefs.sh | ||
README.md | ||
rustfmt.toml |
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
Version semantics
The tools relies on an expected disk format structure which is reflected by your current kernel version. Disk format can be upgraded or downgraded automatically by the kernel, if needed.
- Any patch-level change means no disk format change
- Any minor-level change means a potential disk format change which is not breaking
- Any major-level change means breaking changes
Build and install
Refer to INSTALL.md
Bug reports and contributions
- The official mailing list, linux-bcachefs@vger.kernel.org
- IRC: #bcache on OFTC (irc.oftc.net). Although, note that it can be easily missed.