mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
bcachefs: Don't generate alloc updates to invalid buckets
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
e7f1a52849
commit
eca5b56ccf
|
|
@ -604,6 +604,13 @@ static int bch2_trigger_pointer(struct btree_trans *trans,
|
|||
}
|
||||
|
||||
struct bpos bucket = PTR_BUCKET_POS(ca, &p.ptr);
|
||||
if (!bucket_valid(ca, bucket.offset)) {
|
||||
if (insert) {
|
||||
bch2_dev_bucket_missing(ca, bucket.offset);
|
||||
ret = -BCH_ERR_trigger_pointer;
|
||||
}
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (flags & BTREE_TRIGGER_transactional) {
|
||||
struct bkey_i_alloc_v4 *a = bch2_trans_start_alloc_update(trans, bucket, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user