summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-10-08Add iops to bch_memberHEADmasterHunter Shaffer
Signed-off-by: Hunter Shaffer <huntershaffer182456@gmail.com>
2023-10-08Change open_for_format to the block io apiHunter Shaffer
Upcoming patch will add device benchmarking at format time, which needs the bio API. Signed-off-by: Hunter Shaffer <huntershaffer182456@gmail.com>
2023-10-08deleted unused path to device in get_size, get_blocksizeHunter Shaffer
Signed-off-by: Hunter Shaffer <huntershaffer182456@gmail.com>
2023-10-08Update bcachefs sources to 7bf1ac0d46 bcachefs: Correctly initialize new ↵Kent Overstreet
buckets on device resize Signed-off-by: Hunter Shaffer <huntershaffer182456@gmail.com>
2023-09-29Handle -EAGAIN from io_submit()Kent Overstreet
If io_submit() returns -EAGAIN, that just means the io context is full and we need to wait for completions - no need to die. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-09-26Update bcachefs sources to a1b6677dca57 bcachefs: Fix looping around ↵Kent Overstreet
bch2_propagate_key_to_snapshot_leaves()
2023-09-26Update bcachefs sources to 1336a995cbc3 bcachefs: Silence transaction ↵Kent Overstreet
restart error message
2023-09-26Create symlinks on install with ln -sfKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-09-23Update bcachefs sources to f9c612bbf82d bcachefs: Fixes for building in ↵Kent Overstreet
userspace Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-09-22Kill shell script wrappersKent Overstreet
nixos has trouble with the shell script wrappers - readlink isn't available by default! But, there's a better approach: just get rid of them and use symlinks instead, and have main() check what we're supposed to be. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-09-19bcachefs-tools: fix endian problems between bit spinlocks and futexesBrian Foster
bcachefs format on a big-endian (s390x) machine crashes down in the rhashtable code imported from the kernel. The reason this occurs lies within the rht_lock() -> bit_spin_lock() code, the latter of which casts bitmaps down to 32-bits to satisfy the requirements of the futex interface. The specific problem here is that a 64 -> 32 bit cast doesn't refer to the lower 8 bytes on a big endian machine, which means setting bit number 0 in the 32-bit map actually corresponds to bit 32 in the 64-bit map. The rhashtable code specifically uses bit zero of the bucket pointer for exclusion and uses native bitops elsewhere (i.e. __rht_ptr()) to identify NULL pointers. If bit 32 of the pointer is set by the locking code instead of bit 0, an otherwise NULL pointer looks like a non-NULL value and results in a segfault. The bit spinlock code imported by the kernel is originally intended to work with unsigned long. The kernel code is able to throttle the cpu directly when under lock contention, while the userspace implementation relies on the futex primitives to emulate reliable blocking. Since the futex interface introduces the 32-bit requirement, isolate the associated userspace hack to that particular code. Restore the native bitmap behavior of the bit spinlock code to address the rhashtable problem described above. Since this is not compatible with the futex interface, create a futex wrapper specifically to convert the native bitmap type to a 32-bit virtual address and mask value for the purposes of waiting/waking when under lock contention. Signed-off-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-09-19libbcachefs: convert sb features mask to little endianBrian Foster
bch_sb.features is an array of __le64. Convert the native endian format of the features mask appropriately. This causes a bcachefs format to produce an unmountable fs when run from a big endian system. Signed-off-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-09-08cmd_mount: request passphrase if the existing key is revokedColin Gillespie
Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
2023-09-08cmd_set_passphrase: revoke the invalidated keyColin Gillespie
After setting a new passphrase, the previous key is left untouched. This revokes the old key, preventing future actions from using it in error. Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
2023-09-03cmd_mount: Fix test-only mount pathChristopher James Halse Rogers
The comman line help claims that `bcachefs mount <DEV>` without a mount point will do a dry-run mount - all the steps required to mount the fs, but without actually doing the final real mount. Make the code actually do this, rather than complain that you haven't supplied a mountpoint if you don't provide a mountpoint Signed-off-by: Christopher James Halse Rogers <raof@ubuntu.com>
2023-09-01Fix one second delay when exitingTorge Matthies
Signed-off-by: Torge Matthies <openglfreak@googlemail.com>
2023-08-28Update bcachefs sources to e7f6215768 bcachefs: Fix snapshot_skiplist_good()Kent Overstreet
2023-08-22Fix null ptr deref in bbpos_parse()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-18Update bcachefs sources to bed61fae3b bcachefs: Delete a faulty assertionKent Overstreet
2023-08-17Update bcachefs sources to a8115093df bcachefs: Fix divide by zero in ↵Kent Overstreet
rebalance_work()
2023-08-12cmd_mount: use the correct keyring key typeColin Gillespie
Mount is checking for and adding encryption keys using the logon key type instead of the user key type. This was causing it to not be able to unlock volumes on its own, and ask for a passphrase on already unlocked volumes. Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
2023-08-11Update bcachefs sources to b0788c47d9 bcachefs: Fix check_version_upgrade()Kent Overstreet
2023-08-11cmd_dump: Also set read_onlyKent Overstreet
In nochanges mode, without read_only, we can go into a fake rw mode where we allow writes but hold them in memory. That's not what we want for the dump tool - this fixes a bug where btree nodes don't always get dumped correctly. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-11fuse: Set fsname correctlyKent Overstreet
Also, add helpers for the fuse.bcachefs filesystem type; this means we can now test the fuse version with fstests. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-10cmd_mount: don't return 0 on mount failureLinus Heckemann
Signed-off-by: Linus Heckemann <git@sphalerite.org>
2023-08-08fuse: Update for snapshotsKent Overstreet
cmd_fusermount.c builds again Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-06Update bcachefs sources to 717b356d1d bcachefs: Convert journal validation ↵Kent Overstreet
to bkey_invalid_flags Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-04ci: set and verify MSRVAlexander Fougner
To prevent uncontrolled usage of new rust features, directly or from dependencies, set a minimum supported Rust version and verify it builds. Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-08-04Remove sparse protocol envvarAlexander Fougner
Default as of rust 1.70 Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-08-03cmd_dump: Making dumping the entire journal the defaultKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-03Update bcachefs sources to 5b8c4a1366 bcachefs: ↵Kent Overstreet
bcachefs_metadata_version_deleted_inodes
2023-08-01Update bcachefs sources to 33a60d9b05 bcachefs: Assorted fixes for clangKent Overstreet
2023-08-01cmd_list_journal: Tweak extent matchingKent Overstreet
Extents can now additionally be matched by the end position, the same as normal keys. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-01bpos_parse() now handles symbol constantsKent Overstreet
We can now parse U32_MAX/U64_MAX, as printed by bch2_bpos_to_text(). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-20Run shrinkers when pthread_create failsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-20Update bcachefs sources to 4b5917839c bcachefs: Fix a null ptr deref in ↵Kent Overstreet
check_xattr()
2023-07-20Fix 'bcachefs fsck -y'Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-20Update bcachefs sources to ee560a3929 bcachefs: Print version, options ↵Kent Overstreet
earlier in startup path
2023-07-20ci: upgrade to checkout action v3Alexander Fougner
v2 is deprecated Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-07-20.gitignore: replace travis with github-ci configJörg Thalheim
2023-07-20add dependabot config to keep github ci actions up-to-dateJörg Thalheim
2023-07-20ci: unpin nix install urlJörg Thalheim
I don't think we no longer need this and the install-nix-action is not compatible with it.
2023-07-20ci: bump install-nix-action/cachix to fix nixos buildJörg Thalheim
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2023-07-15Update bcachefs sources to e14d7c7195 bcachefs: Compression levelsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-10Add additional information about encryptionDemi Marie Obenour
This adds additional details about how encryption works in bcachefs, along with a warning regarding snapshots. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2023-07-10Update bcachefs sources to 04f2d2ae5b bcachefs: Fix build error on weird gccKent Overstreet
2023-07-10Update bcachefs sources to 070ec8d07b bcachefs: Snapshot depth, skiplist fieldsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-10Update bcachefs sources to fb39031ade bcachefs: bch2_sb_maybe_downgrade(), ↵Kent Overstreet
bch2_sb_upgrade() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-10Update bcachefs sources to 1e3ca87f7b bcachefs: ↵Kent Overstreet
bcachefs_metadata_version_major_minor
2023-07-09Update bcachefs sources to da7d42a9a2 bcachefs: Add new assertions for ↵Kent Overstreet
shutdown path Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>