summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
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-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-08-17Update bcachefs sources to a8115093df bcachefs: Fix divide by zero in ↵Kent Overstreet
rebalance_work()
2023-08-11Update bcachefs sources to b0788c47d9 bcachefs: Fix check_version_upgrade()Kent Overstreet
2023-08-01Update bcachefs sources to 33a60d9b05 bcachefs: Assorted fixes for clangKent Overstreet
2023-07-15Update bcachefs sources to e14d7c7195 bcachefs: Compression levelsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-10Update bcachefs sources to 070ec8d07b bcachefs: Snapshot depth, skiplist fieldsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
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>
2023-07-07Update bcachefs sources to 25de2b00dc bcachefs: Change check for invalid key ↵Kent Overstreet
types Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-06-27get_random_u32_below()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-06-27Update bcachefs sources to 84f132d569 bcachefs: fsck: Break walk_inode() up ↵Kent Overstreet
into multiple functions Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-06-18Switch to CLOCK_MONOTONIC_COARSEKent Overstreet
CLOCK_MONOTONIC requires a syscall, and is much more expensive. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-06-10Update bcachefs sources to ed6b7f81a7 six locks: Disable percpu read lock ↵Kent Overstreet
mode in userspace Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-06-04Update bcachefs sources to 7c0fe6f104 bcachefs: Fix bch2_fsck_ask_yn()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-05-25Update bcachefs sources to 31c09369cd six locks: Fix an unitialized varKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-05-13Update bcachefs sources to 400f275d46 bcachefs: Fix check_overlapping_extents()Kent Overstreet
2023-05-02Update bcachefs sources to 6a20aede29 bcachefs: Fix quotas + snapshotsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-04-26A small compile fixMikulas Patocka
Hi Here I'm sending a small compile fix for bcachefs-tools. Without this patch, I get this error: cargo build --release --manifest-path rust-src/Cargo.toml Compiling bch_bindgen v0.1.0 (/usr/src/git/bcachefs-tools/rust-src/bch_bindgen) error: failed to run custom build command for `bch_bindgen v0.1.0 (/usr/src/git/bcachefs-tools/rust-src/bch_bindgen)` Caused by: process didn't exit successfully: `/usr/src/git/bcachefs-tools/rust-src/target/release/build/bch_bindgen-733e88995ce9eab7/build-script-build` (exit status: 101) --- stderr warning: optimization flag '-fkeep-inline-functions' is not supported [-Wignored-optimization-argument] ../../include/linux/bit_spinlock.h:20:3: error: call to undeclared function 'futex'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] ../../include/linux/bit_spinlock.h:28:2: error: call to undeclared function 'futex'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] ../../include/linux/bit_spinlock.h:39:2: error: call to undeclared function 'futex'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] The futex() function is declared in /usr/include/x86_64-linux-gnu/urcu/futex.h It is not declared in linux/futex.h, so we need to include urcu/futex.h Mikulas Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-04-21Update bcachefs sources to 2115a2ffde bcachefs: Kill ↵Kent Overstreet
bch2_verify_bucket_evacuated()
2023-04-15Update bcachefs sources to 504729f99c bcachefs: Allow answering y or n to ↵Kent Overstreet
all fsck errors of given type Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-31Update bcachefs sources to 8fd009dd76 bcachefs: Rip out code for storing ↵Kent Overstreet
backpointers in alloc keys Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-06Update bcachefs sources to 3856459b1b bcachefs: ↵Kent Overstreet
bch2_btree_iter_peek_node_and_restart() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-04Update bcachefs sources to 171da96d76 bcachefs: Drop some anonymous structs, ↵Kent Overstreet
unions
2023-03-02linux shim: hlist_unhashed()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-27Update bcachefs sources to ca97ee3577 bcachefs: ↵Kent Overstreet
bch2_btree_iter_peek_and_restart_outlined() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-20Update bcachefs sources to 8e1519ccb6 bcachefs: Add tracepoint & counter for ↵Kent Overstreet
btree split race Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-17Update bcachefs sources to 1b14994029 bcachefs: Fragmentation LRUKent Overstreet
2023-02-13Fix cpu_relax()Kent Overstreet
cpu_relax() is supposed to be a compiler barrier - this fixes a bug with btree_write_buffer_flush() getting stuck. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-12Update bcachefs sources to 3e0c5b0722 fixup! bcachefs: Btree write bufferKent Overstreet
2023-02-09Update bcachefs sources to ea93c26e98 fixup! bcachefs: We can handle missing ↵Kent Overstreet
btree roots for all alloc btrees Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-12-19Change memory reclaimKent Overstreet
- Spin up a background thread to call the shrinkers every 1 second - Memory allocations will only call reclaim after a failed allocation, not every single time This will be a major performance boost on allocation intensive workloads. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-12-13Update bcachefs sources to 84505cfd37 bcachefs: Go RW before check_alloc_info()Kent Overstreet
2022-12-09Update bcachefs sources to ed2a5f4260 bcachefs: Add a missing ↵Kent Overstreet
bch2_btree_path_traverse() call
2022-11-26Update bcachefs sources to 5963d1b1a4 bcacehfs: Fix ↵Kent Overstreet
bch2_get_alloc_in_memory_pos()
2022-11-24Fix build against musl libc.Stijn Tintel
The musl C library does not define __attribute_const__. Add it to include/linux/compiler.h with a guard to fix build against musl libc. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-11-13Update bcachefs sources to 8d3fc97ca3 bcachefs: Fixes for building in userspaceKent Overstreet
2022-10-23Update bcachefs sources to 70fa0c1ff4 fixup! bcachefs: Btree key cache ↵Kent Overstreet
improvements
2022-10-22Update bcachefs sources to cd779e0cc5 bcachefs: Skip inode unpack/pack in ↵Kent Overstreet
bch2_extent_update()
2022-10-15Update bcachefs sources to 3e93567c51 bcachefs: Switch to local_clock() for ↵Kent Overstreet
fastpath time source
2022-10-11fixup! Don't run shrinkers without GFP_KERNELKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-10-11Don't run shrinkers without GFP_KERNELKent Overstreet
This would correspond to GFP_RECLAIM in the kernel - but we don't distinguish between different types of reclaim here. This solves a deadlock in the btree node memory allocation path - we allocate with the btree node cache lock held but without GFP_KERNEL set. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-10-10Update bcachefs sources to 47ffed9fad bcachefs: ↵Kent Overstreet
bch2_btree_delete_range_trans() now uses peek_upto()
2022-10-09Update bcachefs sources to cbccc6d869 bcachefs: Ratelimit ec error messageKent Overstreet
2022-09-28Update bcachefs sources to 24c6361e20 bcachefs: Fix a trans path overflow in ↵Kent Overstreet
bch2_btree_delete_range_trans() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-09-04Update bcachefs sources to 176718966e bcachefs: Re-enable hash_redo_key()Kent Overstreet
2022-08-18Update bcachefs sources to dfaf9a6ee2 lib/printbuf: Clean up headersKent Overstreet
2022-08-11Update bcachefs sources to 90a9c61e2b bcachefs: Switch ↵Kent Overstreet
bch2_btree_delete_range() to bch2_trans_run()
2022-07-17Update bcachefs sources to d82da7126f fixup! bcachefs: for_each_btree_key2()Kent Overstreet
2022-06-27Update bcachefs sources to 95ff72a6c1 fixup! mm: Centralize & improve oom ↵Kent Overstreet
reporting in show_mem.c
2022-06-27hweight32()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>