The promote path had a BUG_ON() for unknown error type, which we're now
seeing: change it to a WARN_ON() - because we're curious what this is -
and otherwise handle it in the normal error path.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
.write_flags = BCH_WRITE_ALLOC_NOWAIT|BCH_WRITE_CACHED,
},
btree_id, k);
- if (ret == -BCH_ERR_nocow_lock_blocked) {
+ if (ret) {
+ WARN_ONCE(ret != -BCH_ERR_nocow_lock_blocked,
+ "%s: saw unknown error %s\n", __func__, bch2_err_str(ret));
+
ret = rhashtable_remove_fast(&c->promote_table, &op->hash,
bch_promote_params);
BUG_ON(ret);
goto err;
}
- BUG_ON(ret);
op->write.op.end_io = promote_done;
return op;