diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-07-10 00:31:51 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:08:45 +0200 |
commit | af4d05c46b1ef2b2b43e9df1924e204efe205ec6 (patch) | |
tree | 5483aabecf73bbf22a0e26e54f5a2dd531551dda /fs/bcachefs/ec.h | |
parent | bcachefs: Fix for bad stripe pointers (diff) | |
download | linux-af4d05c46b1ef2b2b43e9df1924e204efe205ec6.tar.xz linux-af4d05c46b1ef2b2b43e9df1924e204efe205ec6.zip |
bcachefs: Account for stripe parity sectors separately
Instead of trying to charge EC parity to the data within the stripe
(which is subject to rounding errors), let's charge it to the stripe
itself. It should also make -ENOSPC issues easier to deal with if we
charge for parity blocks up front, and means we can also make more fine
grained accounting available to the user.
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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/ec.h b/fs/bcachefs/ec.h index 6db16cf768da..15f751fc2a35 100644 --- a/fs/bcachefs/ec.h +++ b/fs/bcachefs/ec.h @@ -3,6 +3,7 @@ #define _BCACHEFS_EC_H #include "ec_types.h" +#include "buckets_types.h" #include "keylist_types.h" const char *bch2_stripe_invalid(const struct bch_fs *, struct bkey_s_c); @@ -105,6 +106,7 @@ struct ec_stripe_new { struct open_buckets blocks; u8 data_block_idx[EC_STRIPE_MAX]; struct open_buckets parity; + struct disk_reservation res; struct keylist keys; u64 inline_keys[BKEY_U64s * 8]; |