Commit 28624ba4 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Be sure to check ptr->dev in copygc pred function

Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 62df3d44
......@@ -85,6 +85,7 @@ static enum data_cmd copygc_pred(struct bch_fs *c, void *arg,
BUG_ON(i != j);
#endif
if (i >= 0 &&
p.ptr.dev == h->data[i].dev &&
p.ptr.offset < h->data[i].offset + ca->mi.bucket_size &&
p.ptr.gen == h->data[i].gen) {
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment