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
Kent Overstreet
4b9e40b23a
fix incorrect errno usage
2017-08-23 16:29:28 -06:00
Kent Overstreet
565b4a74d6
Update bcachefs sources to 14e9ac5016 bcachefs: btree_iter fastpath
2017-05-12 23:14:24 -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
e004b95b88
fix sync writes - don't use O_EXCL
2017-05-05 00:27:50 -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
5c7454176e
cmd_list improvements; use %m
2017-04-14 20:40:50 -08:00
Kent Overstreet
819f2dde79
Update bcachefs sources to f026e4e024
2017-04-14 20:40:31 -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
2ea91f85d8
make linux shim timer code less fragile
2017-03-19 17:45:29 -08:00
Kent Overstreet
5ec39af8ea
Rename from bcache-tools to bcachefs-tools
2017-03-19 17:31:47 -08:00
Kent Overstreet
a17f7bcec7
cmd_migrate
2017-03-09 09:14:11 -09:00
Kent Overstreet
171ee48e57
Delete more unused shim code, update bcache code
2017-03-03 23:17:31 -09:00
Kent Overstreet
a5b5eba7f7
New on disk format - encryption
2017-02-28 03:05:38 -09:00
Kent Overstreet
e4d1c93d85
fewer workqueues
2017-02-07 15:41:52 -09:00
Kent Overstreet
ab88049a08
linux shim: return an error on failure to open
2017-02-02 17:25:59 -09:00