|
@@ -538,6 +538,7 @@ static bool bch_extent_bad(struct btree_keys *bk, const struct bkey *k)
|
|
|
{
|
|
{
|
|
|
struct btree *b = container_of(bk, struct btree, keys);
|
|
struct btree *b = container_of(bk, struct btree, keys);
|
|
|
unsigned int i, stale;
|
|
unsigned int i, stale;
|
|
|
|
|
+ char buf[80];
|
|
|
|
|
|
|
|
if (!KEY_PTRS(k) ||
|
|
if (!KEY_PTRS(k) ||
|
|
|
bch_extent_invalid(bk, k))
|
|
bch_extent_invalid(bk, k))
|
|
@@ -547,19 +548,19 @@ static bool bch_extent_bad(struct btree_keys *bk, const struct bkey *k)
|
|
|
if (!ptr_available(b->c, k, i))
|
|
if (!ptr_available(b->c, k, i))
|
|
|
return true;
|
|
return true;
|
|
|
|
|
|
|
|
- if (!expensive_debug_checks(b->c) && KEY_DIRTY(k))
|
|
|
|
|
- return false;
|
|
|
|
|
-
|
|
|
|
|
for (i = 0; i < KEY_PTRS(k); i++) {
|
|
for (i = 0; i < KEY_PTRS(k); i++) {
|
|
|
stale = ptr_stale(b->c, k, i);
|
|
stale = ptr_stale(b->c, k, i);
|
|
|
|
|
|
|
|
|
|
+ if (stale && KEY_DIRTY(k)) {
|
|
|
|
|
+ bch_extent_to_text(buf, sizeof(buf), k);
|
|
|
|
|
+ pr_info("stale dirty pointer, stale %u, key: %s",
|
|
|
|
|
+ stale, buf);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
btree_bug_on(stale > BUCKET_GC_GEN_MAX, b,
|
|
btree_bug_on(stale > BUCKET_GC_GEN_MAX, b,
|
|
|
"key too stale: %i, need_gc %u",
|
|
"key too stale: %i, need_gc %u",
|
|
|
stale, b->c->need_gc);
|
|
stale, b->c->need_gc);
|
|
|
|
|
|
|
|
- btree_bug_on(stale && KEY_DIRTY(k) && KEY_SIZE(k),
|
|
|
|
|
- b, "stale dirty pointer");
|
|
|
|
|
-
|
|
|
|
|
if (stale)
|
|
if (stale)
|
|
|
return true;
|
|
return true;
|
|
|
|
|
|