summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/ec.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-07-09 18:31:51 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:45 -0400
commitaf4d05c46b1ef2b2b43e9df1924e204efe205ec6 (patch)
tree5483aabecf73bbf22a0e26e54f5a2dd531551dda /fs/bcachefs/ec.h
parent39283c712e6df927c7c49e8b738ca110551bb399 (diff)
downloadlinux-af4d05c46b1ef2b2b43e9df1924e204efe205ec6.tar.gz
linux-af4d05c46b1ef2b2b43e9df1924e204efe205ec6.tar.bz2
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.h2
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];