Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'block-5.11-2021-02-05' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
"A few small regression fixes:

- NVMe pull request from Christoph:
- more quirks for buggy devices (Thorsten Leemhuis, Claus Stovgaard)
- update the email address for Keith (Keith Busch)
- fix an out of bounds access in nvmet-tcp (Sagi Grimberg)

- Regression fix for BFQ shallow depth calculations introduced in
this merge window (Lin)"

* tag 'block-5.11-2021-02-05' of git://git.kernel.dk/linux-block:
nvmet-tcp: fix out-of-bounds access when receiving multiple h2cdata PDUs
bfq-iosched: Revert "bfq: Fix computation of shallow depth"
update the email address for Keith Bush
nvme-pci: ignore the subsysem NQN on Phison E16
nvme-pci: avoid the deepest sleep state on Kingston A2000 SSDs

+12 -5
+2
.mailmap
··· 179 179 Kees Cook <keescook@chromium.org> <keescook@google.com> 180 180 Kees Cook <keescook@chromium.org> <kees@outflux.net> 181 181 Kees Cook <keescook@chromium.org> <kees@ubuntu.com> 182 + Keith Busch <kbusch@kernel.org> <keith.busch@intel.com> 183 + Keith Busch <kbusch@kernel.org> <keith.busch@linux.intel.com> 182 184 Kenneth W Chen <kenneth.w.chen@intel.com> 183 185 Konstantin Khlebnikov <koct9i@gmail.com> <khlebnikov@yandex-team.ru> 184 186 Konstantin Khlebnikov <koct9i@gmail.com> <k.khlebnikov@samsung.com>
+4 -4
block/bfq-iosched.c
··· 6332 6332 * limit 'something'. 6333 6333 */ 6334 6334 /* no more than 50% of tags for async I/O */ 6335 - bfqd->word_depths[0][0] = max(bt->sb.depth >> 1, 1U); 6335 + bfqd->word_depths[0][0] = max((1U << bt->sb.shift) >> 1, 1U); 6336 6336 /* 6337 6337 * no more than 75% of tags for sync writes (25% extra tags 6338 6338 * w.r.t. async I/O, to prevent async I/O from starving sync 6339 6339 * writes) 6340 6340 */ 6341 - bfqd->word_depths[0][1] = max((bt->sb.depth * 3) >> 2, 1U); 6341 + bfqd->word_depths[0][1] = max(((1U << bt->sb.shift) * 3) >> 2, 1U); 6342 6342 6343 6343 /* 6344 6344 * In-word depths in case some bfq_queue is being weight- ··· 6348 6348 * shortage. 6349 6349 */ 6350 6350 /* no more than ~18% of tags for async I/O */ 6351 - bfqd->word_depths[1][0] = max((bt->sb.depth * 3) >> 4, 1U); 6351 + bfqd->word_depths[1][0] = max(((1U << bt->sb.shift) * 3) >> 4, 1U); 6352 6352 /* no more than ~37% of tags for sync writes (~20% extra tags) */ 6353 - bfqd->word_depths[1][1] = max((bt->sb.depth * 6) >> 4, 1U); 6353 + bfqd->word_depths[1][1] = max(((1U << bt->sb.shift) * 6) >> 4, 1U); 6354 6354 6355 6355 for (i = 0; i < 2; i++) 6356 6356 for (j = 0; j < 2; j++)
+4
drivers/nvme/host/pci.c
··· 3242 3242 { PCI_DEVICE(0x144d, 0xa822), /* Samsung PM1725a */ 3243 3243 .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY | 3244 3244 NVME_QUIRK_IGNORE_DEV_SUBNQN, }, 3245 + { PCI_DEVICE(0x1987, 0x5016), /* Phison E16 */ 3246 + .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, }, 3245 3247 { PCI_DEVICE(0x1d1d, 0x1f1f), /* LighNVM qemu device */ 3246 3248 .driver_data = NVME_QUIRK_LIGHTNVM, }, 3247 3249 { PCI_DEVICE(0x1d1d, 0x2807), /* CNEX WL */ ··· 3261 3259 .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, }, 3262 3260 { PCI_DEVICE(0x1d97, 0x2263), /* SPCC */ 3263 3261 .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, }, 3262 + { PCI_DEVICE(0x2646, 0x2263), /* KINGSTON A2000 NVMe SSD */ 3263 + .driver_data = NVME_QUIRK_NO_DEEPEST_PS, }, 3264 3264 { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001), 3265 3265 .driver_data = NVME_QUIRK_SINGLE_VECTOR }, 3266 3266 { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
+2 -1
drivers/nvme/target/tcp.c
··· 305 305 length = cmd->pdu_len; 306 306 cmd->nr_mapped = DIV_ROUND_UP(length, PAGE_SIZE); 307 307 offset = cmd->rbytes_done; 308 - cmd->sg_idx = DIV_ROUND_UP(offset, PAGE_SIZE); 308 + cmd->sg_idx = offset / PAGE_SIZE; 309 309 sg_offset = offset % PAGE_SIZE; 310 310 sg = &cmd->req.sg[cmd->sg_idx]; 311 311 ··· 318 318 length -= iov_len; 319 319 sg = sg_next(sg); 320 320 iov++; 321 + sg_offset = 0; 321 322 } 322 323 323 324 iov_iter_kvec(&cmd->recv_msg.msg_iter, READ, cmd->iov,