diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-04-04 04:50:25 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:30 +0300 |
commit | 275c8426fb8fd475e9991b3aa1b20f66069e594f (patch) | |
tree | f3e085040653dd86977f3fe73ce87730ab699556 /fs/bcachefs/ec.c | |
parent | e1effd42a1cb40048002f594c12e823b5e33ed5d (diff) | |
download | linux-275c8426fb8fd475e9991b3aa1b20f66069e594f.tar.xz |
bcachefs: Add rw to .key_invalid()
This adds a new parameter to .key_invalid() methods for whether the key
is being read or written; the idea being that methods can do more
aggressive checks when a key is newly created and being written, when we
wouldn't want to delete the key because of those checks.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/ec.c')
-rw-r--r-- | fs/bcachefs/ec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c index cf9ecb7711c6..7a524f604875 100644 --- a/fs/bcachefs/ec.c +++ b/fs/bcachefs/ec.c @@ -103,7 +103,7 @@ struct ec_bio { /* Stripes btree keys: */ int bch2_stripe_invalid(const struct bch_fs *c, struct bkey_s_c k, - struct printbuf *err) + int rw, struct printbuf *err) { const struct bch_stripe *s = bkey_s_c_to_stripe(k).v; @@ -129,7 +129,7 @@ int bch2_stripe_invalid(const struct bch_fs *c, struct bkey_s_c k, return -EINVAL; } - return bch2_bkey_ptrs_invalid(c, k, err); + return bch2_bkey_ptrs_invalid(c, k, rw, err); } void bch2_stripe_to_text(struct printbuf *out, struct bch_fs *c, |