Commit Graph

137 Commits

Author SHA1 Message Date
Kent Overstreet
dded444b20 Update bcachefs sources to dfaf9a6ee2 lib/printbuf: Clean up headers 2022-08-18 12:49:48 -04:00
Kent Overstreet
ddac1641ee Update bcachefs sources to 90a9c61e2b bcachefs: Switch bch2_btree_delete_range() to bch2_trans_run() 2022-08-11 17:34:34 -04:00
Kent Overstreet
79d39bd7ce Update bcachefs sources to d82da7126f fixup! bcachefs: for_each_btree_key2() 2022-07-17 05:20:54 -04:00
Kent Overstreet
64ddfc9fc5 hweight32()
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-06-27 15:58:39 -04:00
Kent Overstreet
23dc00de78 Fix printk_ratelimited()
printk_ratelimited was behind an #ifdef CONFIG_PRINTK, which we don't
define, so it was a complete noop - oops.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-06-22 22:05:39 -04:00
Kent Overstreet
03b8098d37 cmd_dump: Use buffered IO for reading device metadata
We're reading device metadat in mostly sequential order - buffered IO
will be faster than O_DIRECT.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-06-18 18:33:25 -04:00
Kent Overstreet
ffbf806d5c Update bcachefs sources to 3704d0779c bcachefs: Improved human readable integer parsing 2022-06-11 18:14:06 -04:00
Kent Overstreet
6ac37db841 Update bcachefs sources to 24f7e08cd8 bcachefs: shrinker.to_text() methods 2022-06-09 15:07:25 -04:00
Kent Overstreet
46b2c553aa Update bcachefs sources to fad6d13aa5 fixup! bcachefs: Add persistent counters 2022-05-30 23:24:10 -04:00
Kent Overstreet
986533d8d5 Update bcachefs sources to 6ddf061e68 bcachefs: Use a genradix for reading journal entries 2022-04-08 19:26:30 -04:00
Kent Overstreet
cc1b64e992 Flush standard output before popping assertions
Seeing error messages before we die generally makes assertions easier to
debug.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-03-30 23:20:39 -04:00
Kent Overstreet
e240b4ae86 Update bcachefs sources to f638850417 bcachefs: bch2_trans_log_msg() 2022-03-30 17:40:37 -04:00
Kent Overstreet
1a9d73b5c0 Shrinker improvements
After memory allocation failure, don't rely on /proc/meminfo to figure
out how much memory we should free - instead unconditionally free 1/8th
of each cache.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-03-21 20:20:09 -04:00
Kent Overstreet
205d75307a Better bio_alloc_bioset()
bio_alloc_bioset() now uses mempools, so we don't segfault on memory
allocation failure.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-03-21 18:21:31 -04:00
Kent Overstreet
d34e731082 Update bcachefs sources to e48731a188 bcachefs: Fix BTREE_TRIGGER_WANTS_OLD_AND_NEW 2022-03-13 19:20:59 -04:00
Kent Overstreet
bf7924f552 Add freezable_schedule() to linux kernel shim
Also fix the freezable_schedule_timeout() macro.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-03-10 15:38:02 -05:00
Kent Overstreet
cc1a99fb74 Switch to pthread_mutex_t for spinlocks, too
This fixes an observed journal deadlock - real spinlocks aren't safe in
userspace.
2022-02-18 05:58:24 -05:00
Kent Overstreet
a1d66a2a4e Update bcachefs sources to ba398d2906 bcachefs: Fix reflink repair code 2022-02-13 04:08:33 -05:00
Kent Overstreet
9c79275419 Update bcachefs sources to b84661c042 bcachefs: Fix reflink repair code 2022-02-11 18:33:16 -05:00
Kent Overstreet
931ed5a709 Update bcachefs sources to 50ac18afbb bcachefs: Fix an uninitialized variable 2022-01-04 19:56:40 -05:00
Kent Overstreet
617dc6dd68 Retry memory allocation failures
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-01-01 21:14:28 -05:00
Kent Overstreet
42ba8b5a75 Update bcachefs sources to 5fd0c70102 bcachefs: Fix __remove_dirent() 2021-11-03 21:28:23 -04:00
Brett Holman
76821f0760 make BIO_MAX_VECS unsigned, like the kernel definition
Signed-off-by: Brett Holman <bholman.devel@gmail.com>
2021-10-16 13:41:43 -06:00
Kent Overstreet
ac82bc1ea5 Delete unused variable
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-07-28 17:27:25 -04:00
Brett Holman
308d7adcc5 fix for musl and non-x86 archs 2021-07-24 20:16:41 -04:00
Kent Overstreet
86bd5c622c Update bcachefs sources to 787de128a5 bcachefs: Improvements to fsck check_dirents() 2021-07-14 20:31:38 -04:00
Kent Overstreet
700d013b52 Update bcachefs sources to 400c2f8d96 bcachefs: Mask out unknown compat features when going read-write 2021-07-11 13:57:11 -04:00
Kent Overstreet
347c0b108e Update bcachefs sources to dbee44d5ab bcachefs: add bcachefs xxhash support 2021-07-07 20:30:53 -04:00
Kent Overstreet
ff578c6718 Update bcachefs sources to 69be0dae31 bcachefs: Always zero memory from bch2_trans_kmalloc() 2021-06-10 20:25:55 -04:00
Kent Overstreet
4a2acdaf65 Update closures from kernel source tree 2021-05-27 21:13:52 -04:00
Kent Overstreet
27d75d929f Grab math.h from kernel source tree
This gets us round_up() and round_down()

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-05-27 21:12:13 -04:00
Kent Overstreet
2e2d5a3f7e Update bcachefs sources to 0cd3e1d27a bcachefs: Fix for bch2_bkey_pack_pos() not initializing len/version fields 2021-05-17 16:48:48 -04:00
Kent Overstreet
8f72e6940c Fix some minor compiler warnings
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-05-17 16:35:54 -04:00
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
a14d39d7ac bit_spinlocks now use futexes
Spinlocks aren't a good idea in userspace, where we can't actually
disable preemption.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-04-26 20:18:47 -04:00
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