summaryrefslogtreecommitdiff
path: root/include/linux
AgeCommit message (Collapse)Author
6 daysUpdate bcachefs sources to 9404a01d3dc5 bcachefs: Make read_only a mount ↵v1.9.2Kent Overstreet
option again, but hidden Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-17Update bcachefs sources to c56e1ec97dfd bcachefs: Fix bch2_sb_downgrade_update()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-03Update bcachefs sources to f81dc88f0c80 bcachefs: bch2_btree_insert() - add ↵Kent Overstreet
btree iter flags Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-05-24Update bcachefs sources to 254510a1c269 bcachefs: ↵Kent Overstreet
btree_ptr_sectors_written() now takes bkey_s_c
2024-05-09Update bcachefs sources to 07f9a27f1969 bcachefs: add no_invalid_checks flagKent Overstreet
2024-04-03Update bcachefs sources to 09d4c2acbf4c bcachefs: reconstruct_inode()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
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-16Update bcachefs sources to 83338f5b2cb8 bcachefs: fix for building in userspaceKent Overstreet
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-15Update bcachefs sources to 9a555a741e80 bcachefs: omit alignment attribute ↵v1.6.2Kent Overstreet
on big endian struct bkey
2024-02-09Update bcachefs sources to bee7b5a4fa21 bcachefs: Pin btree cache in ram for ↵Kent Overstreet
random access in fsck Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-06Update bcachefs sources to 50847e296b34 bcachefs: Check subvol <-> inode ↵Kent Overstreet
pointers in check_inode() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-24Update bcachefs sources to 481b5f343248 bcachefs: Better error messages for ↵Kent Overstreet
missing inodes in fsck Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-16Move c_src dirs back to toplevelKent Overstreet
We just wanted c sourcefiles out of the top level, not c source directories. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-16move Rust sources to top level, C sources into c_srcThomas Bertschinger
This moves the Rust sources out of rust_src/ and into the top level. Running the bcachefs executable out of the development tree is now: $ ./target/release/bcachefs command or $ cargo run --profile release -- command instead of "./bcachefs command". Building and installing is still: $ make && make install Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-10kill bd_buffered_fdKent Overstreet
this gets us back down to a single fd for opening block devices, which means we can use O_EXCL. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-10kill bd_sync_fdKent Overstreet
not needed with pwritev2(.., RWF_SYNC), and perhaps we can get down to one fd and then use O_EXCL for block devices. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-05atomic64_read_acquire() should be inlineKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-05linux header updatesKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-03Update bcachefs sources to 2a6125decb43 bcachefs: bch_sb_field_downgradeKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-29fix missing atomic64_read_acquire on 32 bitKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-19fix shrinker_free()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-15Update bcachefs sources to 841a95c29f4c bcachefs: fix userspace build errorsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-09bcachefs-tools: Guard the __struct_group() #define in kernel.hChris Webb
Our include/linux/byteorder.h uses the system <asm/byteorder.h> because we don't provide our own in include/asm. This then pulls in system <linux/stddef.h> which defines __struct_group. That definition collides with the unconditional #define __struct_group in our local include/linux/kernel.h, provoking preprocessor warnings. Signed-off-by: Chris Webb <chris@arachsys.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-09bcachefs-tools: Use sysinfo(2) directly to implement si_meminfo()Chris Webb
Use a single sysinfo(2) call to fill out struct sysinfo instead of multiple libc sysconf(3) requests, which will only make sysinfo(2) calls internally anyway. This also enables us to access other struct sysinfo fields, not just the three filled-out previously. As we provide our own definition of struct sysinfo in include/linux/mm.h to match the kernel, which is not guaranteed to align with the definition libc provides in <sys/sysinfo.h>, use syscall(SYS_sysinfo, ...) directly instead of the libc wrapper. Signed-off-by: Chris Webb <chris@arachsys.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-07fix fallback flex arrayAlexander Fougner
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-11-30Update bcachefs sources to 71a5b27e017d bcachefs: Make backpointer fsck wb ↵Kent Overstreet
flush check more rigorous Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-29add a fallback __DECLARE_FLEX_ARRAYv1.3.5Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-22Update bcachefs sources to 783085c3cc44 kbuild: Allow gcov to be enabled on ↵Kent Overstreet
the command line Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-12Update bcachefs sources to 3ca08ab51ec9 bcachefs: six locks: Simplify ↵Kent Overstreet
optimistic spinning Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-08btree_write_buffer: ensure atomic64_sub_return_release availabilityv1.3.3Nicholas Sielicki
prior to this patch, on certain platforms (ie: armv7l), compilation fails due to atomic64_sub_return_release not being defined here. Ensure that the atomics header is pulled in, and ensure that it is available in all cases, regardless of whether ATOMIC64_SPINLOCK is defined. Signed-off-by: Nicholas Sielicki <linux@opensource.nslick.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-07Fix build on 32 bitKent Overstreet
size_t is apparently not an unsigned long on 32 bit, which is what rounddown_pow_of_two() returns. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-02Update bcachefs sources to b9bd69421f73 bcachefs: x-macro-ify inode flags enumv1.3.1Kent Overstreet
2023-10-25Update bcachefs sources to 0d63ed13ea3d closures: Fix race in closure_sync()v1.3Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-10-19Update bcachefs sources to 24bdb6fed91c bcachefs: bch2_btree_id_str()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-10-18Update bcachefs sources to a180af9dd349 bcachefs: Refactor memcpy into ↵Kent Overstreet
direct assignment 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-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 fieldsv1.1Kent 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>