Commit Graph

159 Commits

Author SHA1 Message Date
Kent Overstreet
edc3ffe8f2 Update bcachefs sources to 8d3093bd9b bcachefs: Evict btree nodes we're deleting 2021-04-26 20:18:47 -04:00
Kent Overstreet
30f72f75f5 Add a real mempool implementation
Imported from the kernel.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-04-24 01:36:43 -04:00
Kent Overstreet
ceac31bcb6 Update bcachefs sources to fe72e70682 bcachefs: Fix for btree_gc repairing interior btree ptrs 2021-04-19 21:26:48 -04:00
Kent Overstreet
967c870498 Update bcachefs sources to 8eca47e4d5 bcachefs: Improved check_directory_structure() 2021-04-13 10:24:15 -04:00
Kent Overstreet
b422ff58ba Update bcachefs sources to a8b3ce7599 fixup! bcachefs: Eliminate more PAGE_SIZE uses 2021-04-12 11:48:45 -04:00
Kent Overstreet
d340c4f4a8 Fix krealloc() alignment
bcachefs assumes kmalloc & krealloc give out allocations that are
naturally aligned, like the kernel allocators do.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-04-08 15:48:45 -04:00
Kent Overstreet
a2094890a9 Update bcachefs sources to 18686af684 bcachefs: Inode backpointers 2021-03-29 00:22:38 -04:00
Kent Overstreet
c88113e255 Update bcachefs sources to ad68801b93 bcachefs: Use pcpu mode of six locks for interior nodes 2021-03-24 22:13:00 -04:00
Kent Overstreet
c28f93bc52 generix radix trees: Don't overflow in peek() 2021-02-12 21:42:46 -05:00
Kent Overstreet
868abec1ab Update bcachefs sources to 5e73602f6c bcachefs: Fix for fsck hanging 2021-02-12 16:02:52 -05:00
Kent Overstreet
db931a4571 Update bcachefs sources to e1d0fb8c5f bcachefs: Don't require flush/fua on every journal write 2020-12-04 13:45:33 -05:00
Kent Overstreet
1e574cb1aa Update bcachefs sources to 021e62a098 bcachefs: Fix error in filesystem initialization 2020-11-30 00:06:46 -05:00
Kent Overstreet
13f53aa228 Update bcachefs sources to d1fd471830 bcachefs: Add more debug checks 2020-11-16 18:23:54 -05:00
Kent Overstreet
3420d86959 Round up aligned_alloc() allocations
this fixes an address sanitizer splat

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2020-11-16 18:23:47 -05:00
Kent Overstreet
4df03a2ead Fix kmalloc_array macro
This was causing us some valgrind errors.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2020-11-08 15:23:13 -05:00
Kent Overstreet
d2a118d921 Update bcachefs sources to 1d669389f7 bcachefs: use a radix tree for inum bitmap in fsck 2020-11-07 13:09:23 -05:00
Kent Overstreet
cd9892e543 Update bcachefs sources to 10ab39f2fa bcachefs: Improvements to the journal read error paths 2020-08-24 16:25:05 -04:00
Kent Overstreet
05408b6f8f Update bcachefs sources to 4837f82ee1 bcachefs: Use cached iterators for alloc btree 2020-06-15 16:27:19 -04:00
Kent Overstreet
c32bba1325 Fix build when CONFIG_BCACHEFS_DEBUG=y 2020-06-04 07:57:09 -04:00
Yuxuan Shui
69413acbdc kmalloc: use posix_memalign
posix_memalign doesn't have the restriction that size must be a multiply
of alignment.

This also reverts the fix in commit f3fdbbfa92.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-05-23 17:43:38 +01:00
Kent Overstreet
f8d4cbe40b Update log2.h from linux kernel
This fixes a build breakage where the old log2.g referenced
__ilog2_NaN() which we weren't defining.
2020-05-21 17:19:47 -04:00
Yuxuan Shui
f3fdbbfa92 Make sure aligned_alloc size is a multiply of alignment
Fix a ASan complaint.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-05-21 14:36:00 +01:00
Kent Overstreet
34c9be19b3 Update bcachefs sources to e1f6739c4a bcachefs: Fix another iterator counting bug 2020-05-14 21:48:52 -04:00
Yuxuan Shui
5bc48bd428
Fix building on musl
* Add missing linux/stddef.h includes
* Explicitly cast PAGE_SIZE to size_t. PAGE_SIZE is defined without UL
  suffix in musl
* Musl doesn't define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP, so
  initialize the mutexes with pthread_once.
2020-05-05 10:29:31 +01:00
Kent Overstreet
4d697aa315 Don't leak ksets 2020-01-09 18:02:22 -05:00
Kent Overstreet
f712a866a4 Put valgrind support behind CONFIG_VALGRIND 2019-12-04 17:49:34 -05:00
Justin Husted
ff695c5afb Use the correct clock for userspace time.
The ktime_get_coarse_real_ts64() implementation for userspace was using
CLOCK_MONOTONIC instead of CLOCK_REALTIME_COARSE.  This resulted in
files being timestamped with a time close to the unix epoch.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-04 21:23:46 -08:00
Justin Husted
bf7574260c Add better valgrind support for journal write buffers. 2019-11-03 23:17:43 -05:00
Justin Husted
ff4d082246 Change preempt_disable() etc. to use a recursive mutex.
This is part of the userspace implementation of the kernel APIs for
bcachefs-tools. The previous implementation just provided a barrier, but
this isn't sufficient to make the associated percpu implementation safe.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-03 23:17:43 -05:00
Kent Overstreet
7f3557f57e Update bcachefs sources to 7e03c1ab0e bcachefs: Kill bchfs_extent_update() 2019-10-10 18:06:44 -04:00
Kent Overstreet
98b8f8d0c0 Update six locks 2019-10-01 15:55:42 -04:00
Kent Overstreet
db39aa3e1b Update bcachefs sources to 5a3a4087af bcachefs: Convert a BUG_ON() to a warning 2019-09-25 15:23:50 -04:00
Kent Overstreet
8192cc8ed8 Update llist code
This fixes a bug where the compiler was dropping a null ptr check
2019-08-28 11:35:00 -04:00
Kent Overstreet
cc41f52bcc Update bcachefs sources to 14f68409be bcachefs: Optimize fiemap 2019-08-27 17:37:03 -04:00
Kent Overstreet
72a408f848 Update bcachefs sources to ece184f718 bcachefs: Reflink 2019-08-21 13:19:36 -04:00
Kent Overstreet
f96ba8e0aa Update bcachefs sources to b91a514413 bcachefs: Don't try to delete stripes when RO 2019-07-11 12:00:51 -04:00
Kent Overstreet
7e35389599 Update bcachefs sources to f38382c574 bcachefs: Improve key marking interface 2019-05-24 11:58:42 -04:00
Kent Overstreet
93bdfcb210 Update bcachefs sources to 454bd4f82d bcachefs: Fix for the stripes mark path and gc 2019-05-08 19:13:46 -04:00
Kent Overstreet
b485aae1ba Update bcachefs sources to 6f603b8d79 bcachefs: some improvements to startup messages and options 2019-04-17 19:00:38 -04:00
Kent Overstreet
f652fdc962 define XATTR_CREATE/XATTR_REPLACE for systems with old headers 2019-04-11 00:31:22 -04:00
Kent Overstreet
0abf87f973 fix check for SYS_random 2019-04-10 17:37:00 -04:00
Kent Overstreet
d13bbb2955 Update bcachefs sources to d83b992f65 bcachefs: Rewrite journal_seq_blacklist machinery 2019-04-04 22:25:40 -04:00
Kent Overstreet
133dfeb648 Update bcachefs sources to d868a87c67 bcachefs: fix initial gc 2019-03-28 05:28:38 -04:00
Kent Overstreet
365d345005 Align allocations like the kernel does 2019-03-24 23:38:17 -04:00
Kent Overstreet
0aaa849412 use a mutex for percpu rwsemaphores
bcachefs is using a percpu rwsem to protect percpu data structures, and
in userspace we don't have real percpu data structures - so we need to
guard all access to them with a mutex.
2019-03-08 14:41:57 -05:00
Kent Overstreet
166e32606e better implementation of WARN 2019-03-08 14:41:43 -05:00
Kent Overstreet
35fca2f044 Update bcachefs sources to 99750eab4d bcachefs: Persist stripe blocks_used 2019-01-23 15:53:32 -05:00
Kent Overstreet
47bd483d27 Update bcachefs sources to ef60854e99 bcachefs: More allocator startup improvements 2019-01-13 20:53:25 -05:00
Kent Overstreet
52e4726b51 delete dead code 2019-01-13 15:24:51 -05:00
Kent Overstreet
1504d4c98a check for errors from pthread_create() 2019-01-13 15:17:03 -05:00
Kent Overstreet
825d180c07 Delete more shim layer code 2018-12-19 20:34:24 -05:00
Kent Overstreet
0c7db4eca3 Update bcachefs sources to 62de7539dc bcachefs: Make bkey types globally unique 2018-11-30 12:51:13 -05:00
Kent Overstreet
bca8b084ad Update bcachefs sources to da7fefde29 bcachefs: shim for userspace raid library 2018-11-23 03:05:20 -05:00
Hadrien Copponnex
e69ff279fa Fixed xattr.h includes 2018-11-08 11:18:13 +01:00
Tim Schlueter
03c79a9a25 Added ktime_get_real_seconds() wrapper
Also, changed the last_mount print so it no longer prints out two newlines.
2018-11-04 21:00:33 -08:00
Kent Overstreet
55fbb25501 Update bcachefs sources to d7f6da1d60 bcachefs: fix missing include 2018-10-12 15:10:26 -04:00
Kent Overstreet
cef2f30ae2 Update bcachefs sources to 15f6e66e86 bcachefs: pass around bset_tree less 2018-08-15 20:00:21 -04:00
Kent Overstreet
75c7148e0a Update bcachefs sources to 940d6ca657 bcachefs: acl code improvements 2018-07-13 00:45:28 -04:00
Kent Overstreet
17e2f2775b Update bcachefs sources to 2cb70a82bc bcachefs: delete some debug code 2018-06-27 14:50:43 -04:00
Kent Overstreet
bb6f4111fb Update bcachefs sources to 9abf628c70 bcachefs: Fix a spurious error in fsck 2018-06-01 17:33:19 -04:00
Kent Overstreet
62e4df2a38 drop dead code 2018-05-17 07:24:39 -04:00
Kent Overstreet
84e8950cc7 Switch to liblz4 2018-05-17 02:45:49 -04:00
Kent Overstreet
3588fa621c fixes for 32 bit builds/non x86 archs 2018-05-17 02:36:19 -04:00
Kent Overstreet
ff86d47221 Update bcachefs sources to 0906b1fb49 bcachefs: fixes for 32 bit/big endian machines 2018-05-17 02:36:19 -04:00
Kent Overstreet
c598d91dcb Update bcachefs sources to edf5f38218 bcachefs: Refactor superblock code 2018-04-10 19:23:58 -04:00
Kent Overstreet
90ef8b9f57 Update bcachefs sources to 90d78c2461 bcachefs: Option parsing for io targets 2018-02-19 19:01:05 -05:00
Kent Overstreet
4aefd5f903 add missing include 2018-02-17 13:36:55 -05:00
Leah Neukirchen
e8a350841c include/linux/bitmap.h: inline __bitmap_weight and __bitmap_and 2018-02-10 00:08:32 +01:00
Leah Neukirchen
71c55882fa include/linux/time64.h: no need for __iter_div_u64_rem in userspace 2018-02-09 22:54:12 +01:00
Leah Neukirchen
c725c69d77 include/linux/log2.h: define PAGE_SHIFT when needed 2018-02-09 22:21:46 +01:00
Leah Neukirchen
3217fffd09 Patches to support musl libc
UTIME_NOW is defined in <sys/stat.h> on glibc and musl.
Else, we just need a few headers to get glibc's <sys/cdefs.h> crud.
2018-02-09 22:20:56 +01:00
Kent Overstreet
6976570d67 Update bcachefs sources to d5e561b3cc bcachefs: BCH_DATA ioctl 2018-02-08 15:33:42 -05:00
Kent Overstreet
99adc23cf6 Update bcachefs sources to 0e765bc37c bcachefs: foreground merging of interior btree nodes 2018-02-05 00:31:32 -05:00
Kent Overstreet
27c0b6fbc5 use futex instead of pthread cond variable for schedule 2018-02-05 00:13:40 -05:00
Kent Overstreet
4de98a2712 Update bcachefs sources to 02ae70070a bcachefs: Allocate new btree roots lazily 2018-01-11 07:02:08 -05:00
Kent Overstreet
1cf4d51dc4 Update bcachefs sources to 14ce2a2031 bcachefs: fixes for building in userspace 2017-12-21 18:06:45 -05:00
Kent Overstreet
ea83a3985d Update bcachefs sources to e57b5958cf bcachefs: fix for building in userspace 2017-12-13 16:12:38 -05:00
Kent Overstreet
f2feceddae Shim layer updates 2017-12-13 16:07:21 -05:00
Kent Overstreet
22291ae84a Update bcachefs sources to 9e7ae5219c bcachefs: Make write points more dynamic 2017-11-22 00:50:47 -05:00
Kent Overstreet
3347339bbd Simple stupid memory reclaim code 2017-11-12 16:48:07 -05:00
Kent Overstreet
bf8c59996b Update for new superblock options; makefile improvements 2017-10-08 10:25:36 -08:00
Kent Overstreet
85ee972555 Update bcachefs sources to e82e656279 bcachefs: Cleanups for building in userspace 2017-10-08 10:25:33 -08:00
Kent Overstreet
e7c2bb91bc Faster crc32c 2017-10-08 10:20:36 -08:00
Kent Overstreet
e0c54d52f5 Workarounds for building with gcc 4 2017-08-23 16:30:25 -06:00
Kent Overstreet
8aaf7d913a urandom fallback 2017-08-23 16:29:28 -06:00
Kent Overstreet
38f22164a9 Update bcachefs sources to 6a25f7a00d bcachefs: fix ioctl code 2017-06-13 17:41:59 -08:00
Kent Overstreet
914c4d19ed Fix io from rebase to 4.11 2017-06-13 17:41:22 -08:00
Kent Overstreet
565b4a74d6 Update bcachefs sources to 14e9ac5016 bcachefs: btree_iter fastpath 2017-05-12 23:14:24 -08:00
Kent Overstreet
63065c0128 Update bcachefs sources to 9ceb982d77 bcachefs: Store bucket gens in a btree 2017-05-08 06:57:17 -08:00
Kent Overstreet
f9395eeca5 Update bcachefs sources to 3610542890 bcachefs: Convert to skcipher interface for chacha20 2017-05-05 04:28:45 -08:00
Kent Overstreet
e41920e603 Use aio 2017-04-23 22:05:31 -08:00
Kent Overstreet
c35fbbc025 Update bcachefs sources to 2e70771b8d 2017-04-23 22:00:36 -08:00
Kent Overstreet
819f2dde79 Update bcachefs sources to f026e4e024 2017-04-14 20:40:31 -08:00
Kent Overstreet
e783d814e8 Update bcachefs sources to da037866e6 2017-04-09 20:12:37 -08:00
Kent Overstreet
978c160405 Fix some clang warnings
the issue in cmd_debug - passing members of struct bpos to kstrtoull,
which aren't aligned - was a legit bug
2017-04-04 06:43:08 -08:00
Kent Overstreet
c0ad33c126 bcachefs-in-userspace improvements
Got rid of the stupid shim file hack
2017-03-19 21:39:19 -08:00
Kent Overstreet
5ec39af8ea Rename from bcache-tools to bcachefs-tools 2017-03-19 17:31:47 -08:00
Kent Overstreet
bb1941de53 update bcache sources 2017-03-16 14:51:41 -08:00
Kent Overstreet
ac296ad4dc fix percpu_ref_reinit() 2017-03-16 14:23:40 -08:00
Kent Overstreet
d252e12acc Refactoring for device specific commands 2017-03-12 06:53:43 -08:00