diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-02-18 21:07:25 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:54 -0400 |
commit | 4b1e669995a6c19f1e1cc8a600101edf7fe9277e (patch) | |
tree | 5473319bd7894eff6cfb8e55c2f6c2b4a3787811 /fs/bcachefs/bcachefs.h | |
parent | ba7c37d330816bcc10c55c8eaab268afca2447e8 (diff) | |
download | linux-stable-4b1e669995a6c19f1e1cc8a600101edf7fe9277e.tar.gz linux-stable-4b1e669995a6c19f1e1cc8a600101edf7fe9277e.tar.bz2 linux-stable-4b1e669995a6c19f1e1cc8a600101edf7fe9277e.zip |
bcachefs: Erasure coding: Track open stripes
This adds a new hash table for stripes being created or updated, instead
of hackily relying on the stripes heap.
This lets us reserve the slot for the new stripe up front, at the same
time as we would pick an existing stripe - if we were updating an
existing stripe - making the overall code more consistent.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bcachefs.h')
-rw-r--r-- | fs/bcachefs/bcachefs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h index c9c7ffa9fa71..85a815cdf586 100644 --- a/fs/bcachefs/bcachefs.h +++ b/fs/bcachefs/bcachefs.h @@ -940,6 +940,9 @@ struct bch_fs { GENRADIX(struct stripe) stripes; GENRADIX(struct gc_stripe) gc_stripes; + struct hlist_head ec_stripes_new[32]; + spinlock_t ec_stripes_new_lock; + ec_stripes_heap ec_stripes_heap; struct mutex ec_stripes_heap_lock; |