When the old or new key doesn't exist, we should still pass in a deleted
key with the correct pos. This fixes a bug in the ec code, when
bch2_mark_stripe() was looking up the wrong in-memory stripe.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
struct bkey_s_c old = (struct bkey_s_c) { &deleted, NULL };
int ret;
+ deleted.p = new.k->p;
+
percpu_down_read(&c->mark_lock);
ret = bch2_mark_key_locked(c, old, new, 0, flags);
percpu_up_read(&c->mark_lock);
struct bkey unpacked;
int ret;
+ _deleted.p = path->pos;
+
if (unlikely(flags & BTREE_TRIGGER_NORUN))
return 0;
struct bkey unpacked;
int ret;
+ _deleted.p = path->pos;
+
if (unlikely(flags & BTREE_TRIGGER_NORUN))
return 0;