diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-07-06 22:33:54 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:42 -0400 |
commit | f6b94a3baa956ff10a52a545a9ad60f35e88e683 (patch) | |
tree | b973107ffc3a29c6dd0febbb7b8c42faa7bb2e97 /fs/bcachefs/ec.h | |
parent | 703e2a43bf30c1d5610fa7d1a823911d96487dac (diff) | |
download | linux-stable-f6b94a3baa956ff10a52a545a9ad60f35e88e683.tar.gz linux-stable-f6b94a3baa956ff10a52a545a9ad60f35e88e683.tar.bz2 linux-stable-f6b94a3baa956ff10a52a545a9ad60f35e88e683.zip |
bcachefs: Refactor stripe creation
Prep work for the patch to update existing stripes with new data blocks.
This moves allocating new stripes into ec.c, and also sets up the data
structures so that we can handly only allocating some of the blocks in a
stripe.
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.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/bcachefs/ec.h b/fs/bcachefs/ec.h index 6f9354f82656..d7396885792e 100644 --- a/fs/bcachefs/ec.h +++ b/fs/bcachefs/ec.h @@ -92,11 +92,15 @@ struct ec_stripe_new { atomic_t pin; int err; - bool pending; + u8 nr_data; + u8 nr_parity; + bool allocated; + bool pending; unsigned long blocks_allocated[BITS_TO_LONGS(EC_STRIPE_MAX)]; struct open_buckets blocks; + u8 data_block_idx[EC_STRIPE_MAX]; struct open_buckets parity; struct keylist keys; |