tree:
https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git for-next
head: b85a96a78001249054c14fa62c04497075c8f091
commit: 4bc76ab8cf614f3d480ae08671b53223ca8ad626 [2/6] bcache: remove PTR_CACHE
config: x86_64-randconfig-m001-20210411 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git/c...
git remote add bcache
https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git
git fetch --no-tags bcache for-next
git checkout 4bc76ab8cf614f3d480ae08671b53223ca8ad626
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/md/bcache/bcache.h:182,
from drivers/md/bcache/debug.c:9:
drivers/md/bcache/debug.c: In function 'bch_btree_verify':
> drivers/md/bcache/debug.c:53:19: error: 'c' undeclared
(first use in this function)
53 | bio_set_dev(bio, c->cache->bdev);
| ^
include/linux/bio.h:502:25: note: in definition of macro 'bio_set_dev'
502 | if ((bio)->bi_bdev != (bdev)) \
| ^~~~
drivers/md/bcache/debug.c:53:19: note: each undeclared identifier is reported only once
for each function it appears in
53 | bio_set_dev(bio, c->cache->bdev);
| ^
include/linux/bio.h:502:25: note: in definition of macro 'bio_set_dev'
502 | if ((bio)->bi_bdev != (bdev)) \
| ^~~~
vim +/c +53 drivers/md/bcache/debug.c
9 #include "bcache.h"
10 #include
"btree.h"
11 #include "debug.h"
12 #include "extents.h"
13
14 #include <linux/console.h>
15 #include <linux/debugfs.h>
16 #include <linux/module.h>
17 #include <linux/random.h>
18 #include <linux/seq_file.h>
19
20 struct dentry *bcache_debug;
21
22 #ifdef CONFIG_BCACHE_DEBUG
23
24 #define for_each_written_bset(b, start, i) \
25 for (i = (start); \
26 (void *) i < (void *) (start) + (KEY_SIZE(&b->key) << 9)
&&\
27 i->seq == (start)->seq; \
28 i = (void *) i + set_blocks(i, block_bytes(b->c->cache)) * \
29 block_bytes(b->c->cache))
30
31 void bch_btree_verify(struct btree *b)
32 {
33 struct btree *v = b->c->verify_data;
34 struct bset *ondisk, *sorted, *inmemory;
35 struct bio *bio;
36
37 if (!b->c->verify || !b->c->verify_ondisk)
38 return;
39
40 down(&b->io_mutex);
41 mutex_lock(&b->c->verify_lock);
42
43 ondisk = b->c->verify_ondisk;
44 sorted = b->c->verify_data->keys.set->data;
45 inmemory = b->keys.set->data;
46
47 bkey_copy(&v->key, &b->key);
48 v->written = 0;
49 v->level = b->level;
50 v->keys.ops = b->keys.ops;
51
52 bio = bch_bbio_alloc(b->c);
53 bio_set_dev(bio, c->cache->bdev);
54 bio->bi_iter.bi_sector = PTR_OFFSET(&b->key, 0);
55 bio->bi_iter.bi_size = KEY_SIZE(&v->key) << 9;
56 bio->bi_opf = REQ_OP_READ | REQ_META;
57 bch_bio_map(bio, sorted);
58
59 submit_bio_wait(bio);
60 bch_bbio_free(bio, b->c);
61
62 memcpy(ondisk, sorted, KEY_SIZE(&v->key) << 9);
63
64 bch_btree_node_read_done(v);
65 sorted = v->keys.set->data;
66
67 if (inmemory->keys != sorted->keys ||
68 memcmp(inmemory->start,
69 sorted->start,
70 (void *) bset_bkey_last(inmemory) -
71 (void *) inmemory->start)) {
72 struct bset *i;
73 unsigned int j;
74
75 console_lock();
76
77 pr_err("*** in memory:\n");
78 bch_dump_bset(&b->keys, inmemory, 0);
79
80 pr_err("*** read back in:\n");
81 bch_dump_bset(&v->keys, sorted, 0);
82
83 for_each_written_bset(b, ondisk, i) {
84 unsigned int block = ((void *) i - (void *) ondisk) /
85 block_bytes(b->c->cache);
86
87 pr_err("*** on disk block %u:\n", block);
88 bch_dump_bset(&b->keys, i, block);
89 }
90
91 pr_err("*** block %zu not written\n",
92 ((void *) i - (void *) ondisk) / block_bytes(b->c->cache));
93
94 for (j = 0; j < inmemory->keys; j++)
95 if (inmemory->d[j] != sorted->d[j])
96 break;
97
98 pr_err("b->written %u\n", b->written);
99
100 console_unlock();
101 panic("verify failed at %u\n", j);
102 }
103
104 mutex_unlock(&b->c->verify_lock);
105 up(&b->io_mutex);
106 }
107
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org