diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-12-14 20:52:11 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:52 -0400 |
commit | 350175bf9b0fe5da12a2fd8bfd453a49f038ceb4 (patch) | |
tree | 6118c2363f0ee7570b8d9ac6440b13217b8c322e /fs/bcachefs/alloc_foreground.c | |
parent | f3a37e76cade1469871c4309584ebbc358becf40 (diff) | |
download | linux-stable-350175bf9b0fe5da12a2fd8bfd453a49f038ceb4.tar.gz linux-stable-350175bf9b0fe5da12a2fd8bfd453a49f038ceb4.tar.bz2 linux-stable-350175bf9b0fe5da12a2fd8bfd453a49f038ceb4.zip |
bcachefs: Improved nocow locking
This improves the nocow lock table so that hash table entries have
multiple locks, and locks specify which bucket they're for - i.e. we can
now resolve hash collisions.
This is important because the allocator has to skip buckets that are
locked in the nocow lock table, and previously hash collisions would
cause it to spuriously skip unlocked buckets.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_foreground.c')
-rw-r--r-- | fs/bcachefs/alloc_foreground.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index f78eaa52c11f..9e1c236d57b8 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -28,6 +28,7 @@ #include "io.h" #include "journal.h" #include "movinggc.h" +#include "nocow_locking.h" #include "trace.h" #include <linux/math64.h> |