diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-02-19 03:07:25 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:54 +0200 |
commit | 4b1e669995a6c19f1e1cc8a600101edf7fe9277e (patch) | |
tree | 5473319bd7894eff6cfb8e55c2f6c2b4a3787811 /fs/bcachefs/ec.h | |
parent | bcachefs: Stripe deletion now checks what it's deleting (diff) | |
download | linux-4b1e669995a6c19f1e1cc8a600101edf7fe9277e.tar.xz linux-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/ec.h')
-rw-r--r-- | fs/bcachefs/ec.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/ec.h b/fs/bcachefs/ec.h index 37d42e2a4505..0a69114bb160 100644 --- a/fs/bcachefs/ec.h +++ b/fs/bcachefs/ec.h @@ -148,6 +148,10 @@ struct ec_stripe_new { struct ec_stripe_head *h; struct mutex lock; struct list_head list; + + struct hlist_node hash; + u64 idx; + struct closure iodone; /* counts in flight writes, stripe is created when pin == 0 */ |