* [bcache:zoned 2/3] drivers/md/bcache/request.c:1134:34: error: no member named 'nr_zones' in 'struct request_queue'
@ 2020-05-23 9:23 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-23 9:23 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5878 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git zoned
head: 9560b14e9901073c5fca5e5e6c531dbd950b2b04
commit: 366b493dd533a7de96f719c30d452ea745233836 [2/3] bcache: handle zone management bios for bcache device
config: x86_64-randconfig-a013-20200521 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 366b493dd533a7de96f719c30d452ea745233836
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/md/bcache/request.c:1072:47: warning: variable 'free_keys' is uninitialized when used here [-Wuninitialized]
ret = bch_keylist_realloc(&iop->insert_keys, free_keys, iop->c);
^~~~~~~~~
drivers/md/bcache/request.c:1065:25: note: initialize the variable 'free_keys' to silence this warning
int max_keys, free_keys;
^
= 0
>> drivers/md/bcache/request.c:1134:34: error: no member named 'nr_zones' in 'struct request_queue'
nr_zones = s->d->disk->queue->nr_zones;
~~~~~~~~~~~~~~~~~ ^
drivers/md/bcache/request.c:1422:9: error: implicit declaration of function 'blkdev_report_zones' [-Werror,-Wimplicit-function-declaration]
return blkdev_report_zones(dc->bdev,
^
drivers/md/bcache/request.c:1422:9: note: did you mean 'blkdev_nr_zones'?
include/linux/blkdev.h:373:28: note: 'blkdev_nr_zones' declared here
static inline unsigned int blkdev_nr_zones(struct gendisk *disk)
^
1 warning and 2 errors generated.
vim +1134 drivers/md/bcache/request.c
1054
1055 /*
1056 * Invalidate the LBA range on cache device which is covered by the
1057 * the resetting zones.
1058 */
1059 static int bch_data_invalidate_zones(struct closure *cl,
1060 size_t zone_sector,
1061 size_t nr_zones)
1062 {
1063 struct search *s = container_of(cl, struct search, cl);
1064 struct data_insert_op *iop = &s->iop;
1065 int max_keys, free_keys;
1066 size_t start = zone_sector;
1067 int ret;
1068
1069 max_keys = (block_bytes(iop->c) - sizeof(struct jset)) /
1070 sizeof(uint64_t);
1071 bch_keylist_init(&iop->insert_keys);
> 1072 ret = bch_keylist_realloc(&iop->insert_keys, free_keys, iop->c);
1073 if (ret < 0)
1074 return -ENOMEM;
1075
1076 while (nr_zones-- > 0) {
1077 atomic_t *journal_ref = NULL;
1078 size_t size = s->d->disk->queue->limits.chunk_sectors;
1079 more_keys:
1080 bch_keylist_reset(&iop->insert_keys);
1081 free_keys = max_keys;
1082
1083 while (size > 0 && free_keys >= 2) {
1084 size_t sectors = min_t(size_t, size,
1085 1U << (KEY_SIZE_BITS - 1));
1086
1087 bch_keylist_add(&iop->insert_keys,
1088 &KEY(iop->inode, start, sectors));
1089 start += sectors;
1090 size -= sectors;
1091 free_keys -= 2;
1092 }
1093
1094 /* Insert invalidate keys into btree */
1095 journal_ref = bch_journal(iop->c, &iop->insert_keys, NULL);
1096 if (!journal_ref) {
1097 ret = -EIO;
1098 break;
1099 }
1100
1101 ret = bch_btree_insert(iop->c,
1102 &iop->insert_keys, journal_ref, NULL);
1103 atomic_dec_bug(journal_ref);
1104 if (ret < 0)
1105 break;
1106
1107 if (size)
1108 goto more_keys;
1109 }
1110
1111 bch_keylist_free(&iop->insert_keys);
1112
1113 return ret;
1114 }
1115
1116 static void cached_dev_nodata(struct closure *cl)
1117 {
1118 struct search *s = container_of(cl, struct search, cl);
1119 struct bio *bio = &s->bio.bio;
1120 int nr_zones = 1;
1121
1122 if (s->iop.flush_journal)
1123 bch_journal_meta(s->iop.c, cl);
1124
1125 if (bio_op(bio) == REQ_OP_ZONE_RESET_ALL ||
1126 bio_op(bio) == REQ_OP_ZONE_RESET) {
1127 int err = 0;
1128 /*
1129 * If this is REQ_OP_ZONE_RESET_ALL bio, cached data
1130 * covered by all zones should be invalidate from the
1131 * cache device.
1132 */
1133 if (bio_op(bio) == REQ_OP_ZONE_RESET_ALL)
> 1134 nr_zones = s->d->disk->queue->nr_zones;
1135
1136 err = bch_data_invalidate_zones(
1137 cl, bio->bi_iter.bi_sector, nr_zones);
1138
1139 if (err < 0) {
1140 s->iop.status = errno_to_blk_status(err);
1141 /* debug, should be removed before post patch */
1142 bio->bi_status = BLK_STS_TIMEOUT;
1143 /* set by bio_cnt_set() in do_bio_hook() */
1144 bio_put(bio);
1145 /*
1146 * Invalidate cached data fails, don't send
1147 * the zone reset bio to backing device and
1148 * return failure. Otherwise potential data
1149 * corruption on bcache device may happen.
1150 */
1151 goto continue_bio_complete;
1152 }
1153
1154 }
1155
1156 /*
1157 * For flush or zone management bios, of cause
1158 * they should be sent to backing device too.
1159 */
1160 bio->bi_end_io = backing_request_endio;
1161 closure_bio_submit(s->iop.c, bio, cl);
1162
1163 continue_bio_complete:
1164 continue_at(cl, cached_dev_bio_complete, NULL);
1165 }
1166
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35629 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-23 9:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-23 9:23 [bcache:zoned 2/3] drivers/md/bcache/request.c:1134:34: error: no member named 'nr_zones' in 'struct request_queue' kbuild test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.