diff options
author | Kent Overstreet <kmo@daterainc.com> | 2014-03-13 13:46:29 -0700 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2014-03-18 12:22:36 -0700 |
commit | 4fe6a816707aace9e8e297b708411c5930537793 (patch) | |
tree | 1316f5df799ba13ca96adcf47d87656fdebf394d /drivers/md/bcache/extents.c | |
parent | c13f3af9247db929fe1be86c0442ef161e615ac4 (diff) |
bcache: Add a real GC_MARK_RECLAIMABLE
This means the garbage collection code can better check for data and metadata
pointers to the same buckets.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/extents.c')
-rw-r--r-- | drivers/md/bcache/extents.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/bcache/extents.c b/drivers/md/bcache/extents.c index 416d1a3e028e..82d5e3288a6c 100644 --- a/drivers/md/bcache/extents.c +++ b/drivers/md/bcache/extents.c @@ -499,9 +499,9 @@ static bool bch_extent_bad_expensive(struct btree *b, const struct bkey *k, if (mutex_trylock(&b->c->bucket_lock)) { if (b->c->gc_mark_valid && - ((GC_MARK(g) != GC_MARK_DIRTY && - KEY_DIRTY(k)) || - GC_MARK(g) == GC_MARK_METADATA)) + (!GC_MARK(g) || + GC_MARK(g) == GC_MARK_METADATA || + (GC_MARK(g) != GC_MARK_DIRTY && KEY_DIRTY(k)))) goto err; if (g->prio == BTREE_PRIO) |