summaryrefslogtreecommitdiff
path: root/fs/bcachefs/ec.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-07-07 03:59:46 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:08:42 +0300
commit703e2a43bf30c1d5610fa7d1a823911d96487dac (patch)
treeb04c6086ec71bdc5f624b0d8aa9b2c7e8993b329 /fs/bcachefs/ec.h
parentba6dd1dd493f4e621350fa963e3a95686aaf8a4d (diff)
downloadlinux-703e2a43bf30c1d5610fa7d1a823911d96487dac.tar.xz
bcachefs: Move stripe creation to workqueue
This is mainly to solve a lock ordering issue, and also simplifies the code a bit. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/ec.h')
-rw-r--r--fs/bcachefs/ec.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/bcachefs/ec.h b/fs/bcachefs/ec.h
index 36444cb14190..6f9354f82656 100644
--- a/fs/bcachefs/ec.h
+++ b/fs/bcachefs/ec.h
@@ -92,6 +92,7 @@ struct ec_stripe_new {
atomic_t pin;
int err;
+ bool pending;
unsigned long blocks_allocated[BITS_TO_LONGS(EC_STRIPE_MAX)];
@@ -108,8 +109,6 @@ struct ec_stripe_head {
struct list_head list;
struct mutex lock;
- struct list_head stripes;
-
unsigned target;
unsigned algo;
unsigned redundancy;
@@ -139,7 +138,7 @@ void bch2_ec_bucket_cancel(struct bch_fs *, struct open_bucket *);
int bch2_ec_stripe_new_alloc(struct bch_fs *, struct ec_stripe_head *);
-void bch2_ec_stripe_head_put(struct ec_stripe_head *);
+void bch2_ec_stripe_head_put(struct bch_fs *, struct ec_stripe_head *);
struct ec_stripe_head *bch2_ec_stripe_head_get(struct bch_fs *, unsigned,
unsigned, unsigned);