Commit Graph

68 Commits

Author SHA1 Message Date
Kent Overstreet
bb74624daa Update bcachefs sources to a5c0e1bb30 bcachefs: Clean up bch2_btree_and_journal_walk() 2021-04-30 18:23:38 -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
209695dedf Update bcachefs sources to f26267fc82 bcachefs: kill bset_tree->max_key 2021-04-04 22:15:29 -04:00
Kent Overstreet
98844616f6 If we failed to read /proc/meminfo, just run the shrinkers. 2021-03-31 13:04:34 -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
fb2d506f6f Don't die in kthread_create()
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-02-24 00:41:09 -05:00
Kent Overstreet
c28f93bc52 generix radix trees: Don't overflow in peek() 2021-02-12 21:42:46 -05:00
Kent Overstreet
c1dcd67f7d Don't use mlockall()
We're hitting -ENOMEM while running fsck - we appear to need memory
overcommit, which mlockall() disables.
2021-01-12 16:36:45 -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
1952c0790c Update bcachefs sources to c9b4a210f9 fixup! bcachefs: Fixes for going RO 2020-06-03 19:56:33 -04: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
Justin Husted
d0b5ee0339 Increase stack size of userspace threads to 32k.
Certain fuse tests crashed inside of libc calls such as fprintf() with
only 16k of stack.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-12-14 16:51:54 -08:00
Kent Overstreet
f712a866a4 Put valgrind support behind CONFIG_VALGRIND 2019-12-04 17:49:34 -05:00
Justin Husted
5337ad4a43 Make userspace blkdev cleanup code more robust.
The existing cleanup code would silently cancel disk IO requests, if
somehow the calling code did not wait for completion.  This code now
tracks requests and will bug if any are lost.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-07 18:58:32 -08:00
Justin Husted
76e147d0a9 Fix refcount bug in blkdev and timer kthreads.
The shutdown code in d79d57e and b20e160 had a race condition during
shutdown, due to not owning a reference on the associated task_struct
while the associated threads shut themselves down.

Patch over this by taking an appropriate reference.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-07 16:44:04 -08:00
Justin Husted
d79d57ef89 Stop blkdev completion thread at process exit time, to make valgrind
happy.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-03 23:17:43 -05:00
Justin Husted
97c6f60222 Stop workqueue threads at process exit time, to make valgrind happy.
Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-03 23:17:43 -05:00
Justin Husted
b20e160735 Stop the timer task at process exit time, to make valgrind happy.
Signed-off-by: Justin Husted <sigstop@gmail.com>
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
Justin Husted
e1ed5557bf Add valgrind handling: data read from io_submit was not being marked
properly. Manually mark it.

This might be better done by improving the valgrind wrapper for
io_submit.
2019-10-18 16:23:39 -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
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
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
35fca2f044 Update bcachefs sources to 99750eab4d bcachefs: Persist stripe blocks_used 2019-01-23 15:53:32 -05:00
Kent Overstreet
8630059e6a Update bcachefs sources to bcca1c557b bcachefs: fixes for getting stuck flushing journal pins 2019-01-14 00:49:02 -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
0229719228 Use 16k stack size 2019-01-13 16:57:26 -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
Tim Schlueter
f885dc20eb Don't read meminfo if there are no shrinkers 2018-11-04 13:03:56 -08:00
Kent Overstreet
f2f3de4da4 Delete more shim layer code 2018-06-01 17:33:47 -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
6976570d67 Update bcachefs sources to d5e561b3cc bcachefs: BCH_DATA ioctl 2018-02-08 15:33:42 -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
3347339bbd Simple stupid memory reclaim code 2017-11-12 16:48:07 -05:00
Kent Overstreet
c7950838b2 handle REQ_OP_FLUSH 2017-08-23 16:30:25 -06:00
Kent Overstreet
8aaf7d913a urandom fallback 2017-08-23 16:29:28 -06:00