summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-04-171.7.0 - mi_btree_bitmapv1.7.0Kent Overstreet
New on disk forat feature - per member 64 bit bitmap of regions with btree nodes, to accelerate recovering by scanning for btree nodes. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-04-17Update bcachefs sources to 10ca1f99f8c9 bcachefs: Fix ↵Kent Overstreet
bch2_dev_btree_bitmap_marked_sectors() shift Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-04-15Merge pull request #251 from tasleson/handle_dev_symlinkkoverstreet
mount: canonicalize device path for single device node
2024-04-15Update bcachefs sources to ad29cf999a91 bcachefs: set_btree_iter_dontneed ↵Kent Overstreet
also clears should_be_locked Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-04-09mount: canonicalize device path for single device nodeTony Asleson
If we pass a symlink for a single device node we fail to locate the device node. Canonicalize the device node before we try to read up the superblock. This allows the following to work. # bcachefs mount /dev/mapper/vg-thinvolume /mnt/lv_thin Signed-off-by: Tony Asleson <tasleson@redhat.com>
2024-04-03Update bcachefs sources to 09d4c2acbf4c bcachefs: reconstruct_inode()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-04-01cmd_show_super: Also print device modelKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-03-30cmd_list, cmd_list_journal: pass -o very_degradedKent Overstreet
2024-03-30Update bcachefs sources to 794723fc10c4 bcachefs: Topology repair now uses ↵Kent Overstreet
nodes found by scanning to fill holes Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-03-20mount: Handle multi-device with 1 device nodeTony Asleson
Instead of requiring the user to supply all the device nodes for a multi-device FS, allow them to specifiy 1 of them. We then fetch the UUID for the FS and then find all the disks on the system that match this UUID. This allows me to bring up a bcachefs FS in /etc/fstab by using a UUID. This works because it appears the mount command looks up the UUID, finds an entry in /dev/disk/by-uuid and then passes that found device node to mount.bcachefs which fails with `insufficient_devices_to_start` as bcachefs is expecting a list of devices with a ":" between them. This behavior is preserved if a user specifies a list of all the needed device nodes to bring up the FS. Signed-off-by: Tony Asleson <tasleson@redhat.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-03-18Typo: Tell sh to read the script from stdinThomas Glanzmann
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-03-18Add example to install rust toolchain and add two missing debian build ↵Thomas Glanzmann
dependencies. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-03-16Update bcachefs sources to 83338f5b2cb8 bcachefs: fix for building in userspaceKent Overstreet
2024-03-13Merge pull request #249 from wezm/const-castkoverstreet
Avoid casting away const when processing C command args
2024-03-13Avoid casting away const when processing C command argsWesley Moore
2024-03-08path_to_cstr()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-03-08cmd_dump: Set very_degradedKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-25Update bcachefs sources to 26494335d114 bcachefs: improve move_gap()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-25Merge pull request #243 from CyanChanges/patch-1koverstreet
Typo: `filysestem` -> `filesystem`
2024-02-24bkey.rs: use a single unsafe {} for BkeyValC conversionKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-24Update bcachefs sources to a623b3063d5d bcachefs: Fix check_snapshot() memcpyKent Overstreet
2024-02-24TypoCyan
2024-02-23v1.6.4v1.6.4Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-23powerpc: use "long long" for 64-bit types in userspaceThomas Bertschinger
This resolves build warnings and failures for architectures where the Linux userspace `asm/types.h` header defines 64-bit types (u64, s64) as `long` instead of `long long`. By defining `__SANE_USERSPACE_TYPES__`, these types are defined as `long long` instead. Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-23bch2_sb_is_encrypted{,_and_locked}Roland Vet
Specifically also mention locked Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-23Apply naming convention: passphrase->unlock->key->decrypt->fsRoland Vet
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-23Test 'fix'?Roland Vet
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22Replace 7 spaces and a tab with a tab.Roland Vet
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22Improve error messageRoland Vet
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22Rename sb to block_deviceRoland Vet
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22Rename password{,_policy}Roland Vet
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22Rename KeyLocation to more appropriate KeyPolicyRoland Vet
Also key_location to key_policy Improve help description key policy Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22TypoRoland Vet
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22Rename sbs to block_devices_to_mountRoland Vet
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22Rephrase help messageRoland Vet
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22Remove unnecessary bracketsRoland Vet
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22Add decryption by key_fileRoland Vet
- Add key_file option to Cli - Rework decryption flow logic to first attempt key_file - Read password from file and pass to decrypt_master_key Explicity specify '-k' for key_location Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22Add fmt::Display for KeyLocationRoland Vet
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22Refactor ask_for_key to call new decrypt_master_keyRoland Vet
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22Fix dirent test: lines have changedRoland Vet
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22Fix line checkRoland Vet
Output has become much more verbose: mounting version 1.6: btree_subvolume_children opts=ro,errors=continue,degraded,nochanges,norecovery,read_only recovering from clean shutdown, journal seq 9 alloc_read... done stripes_read... done snapshots_read... done u64s 16 type inode_v3 0:4096:U32_MAX len 0 ver 0: mode=40755 flags= (16300000) journal_seq=1 bi_size=0 bi_sectors=0 bi_version=0bi_atime=90363614 bi_ctime=91363625 bi_mtime=91363625 bi_otime=90363614 bi_uid=0 bi_gid=0 bi_nlink=1 bi_generation=0 bi_dev=0 bi_data_checksum=0 bi_compression=0 bi_project=0 bi_background_compression=0 bi_data_replicas=0 bi_promote_target=0 bi_foreground_target=0 bi_background_target=0 bi_erasure_code=0 bi_fields_set=0 bi_dir=0 bi_dir_offset=0 bi_subvol=1 bi_parent_subvol=0 bi_nocow=0 u64s 17 type inode_v3 0:4097:U32_MAX len 0 ver 0: mode=40700 flags= (15300000) journal_seq=1 bi_size=0 bi_sectors=0 bi_version=0bi_atime=91363625 bi_ctime=91363625 bi_mtime=91363625 bi_otime=91363625 bi_uid=0 bi_gid=0 bi_nlink=0 bi_generation=0 bi_dev=0 bi_data_checksum=0 bi_compression=0 bi_project=0 bi_background_compression=0 bi_data_replicas=0 bi_promote_target=0 bi_foreground_target=0 bi_background_target=0 bi_erasure_code=0 bi_fields_set=0 bi_dir=4096 bi_dir_offset=453699834857023875 bi_subvol=0 bi_parent_subvol=0 bi_nocow=0 Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-20rust: use libc::Ioctl type for ioctl() request argumentThomas Bertschinger
The second argument to ioctl() can be defined as a different type by different libc implementations, and can be a different size on different architectures depending on what type it is defined as. For example, glibc defines it as `unsigned long` which may have a different size on 32-bit vs. 64-bit architectures, and musl libc defines it as `int`. The Rust libc crate exposes a type `libc::Ioctl` which is defined as the appropriate integer type for the given libc implementation. Using this type for the request argument to `libc::ioctl()` ensures code will compile correctly regardless of architecture and libc implementation. Also, because ioctl request numbers are defined to be 32 bits (regardless of the fact that `unsigned long` might sometimes take 64 bits on some architectures), this patch changes the Rust representation of the bcachefs ioctl numbers to u32 instead of u64. Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-20v1.6.3v1.6.3Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-20Update bcachefs sources to c887148ebf99 thread_with_file: add f_ops.flushKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-17cmd_fsck: Collect return code of kernel fsck with close()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-17bch_bindgen: fix packed and aligned structs on i686, ppc64Thomas Bertschinger
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>
2024-02-16Merge remote-tracking branch 'github/master'Kent Overstreet
2024-02-16Merge pull request #211 from oz123/masterkoverstreet
Add option to read passphrase from a keyfile
2024-02-15Update bcachefs sources to 9a555a741e80 bcachefs: omit alignment attribute ↵v1.6.2Kent Overstreet
on big endian struct bkey
2024-02-13fix build on old gccv1.6.1Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>