bcache: kill index()

That was a terrible name for a macro, add some better helpers to replace it.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
This commit is contained in:
Kent Overstreet
2013-12-17 21:46:35 -08:00
parent 5c41c8a713
commit 88b9f8c426
4 changed files with 24 additions and 8 deletions

View File

@@ -88,7 +88,7 @@ static void dump_bset(struct btree *b, struct bset *i)
next = bkey_next(k);
bch_bkey_to_text(buf, sizeof(buf), k);
printk(KERN_ERR "block %zu key %zi/%u: %s", index(i, b),
printk(KERN_ERR "block %u key %zi/%u: %s", bset_block_offset(b, i),
(uint64_t *) k - i->d, i->keys, buf);
for (j = 0; j < KEY_PTRS(k); j++) {