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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'block-5.9-2020-09-11' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:

- Fix a regression in bdev partition locking (Christoph)

- NVMe pull request from Christoph:
- cancel async events before freeing them (David Milburn)
- revert a broken race fix (James Smart)
- fix command processing during resets (Sagi Grimberg)

- Fix a kyber crash with requeued flushes (Omar)

- Fix __bio_try_merge_page() same_page error for no merging (Ritesh)

* tag 'block-5.9-2020-09-11' of git://git.kernel.dk/linux-block:
block: Set same_page to false in __bio_try_merge_page if ret is false
nvme-fabrics: allow to queue requests for live queues
block: only call sched requeue_request() for scheduled requests
nvme-tcp: cancel async events before freeing event struct
nvme-rdma: cancel async events before freeing event struct
nvme-fc: cancel async events before freeing event struct
nvme: Revert: Fix controller creation races with teardown flow
block: restore a specific error code in bdev_del_partition

+16 -25
-12
block/bfq-iosched.c
··· 5896 5896 struct bfq_data *bfqd; 5897 5897 5898 5898 /* 5899 - * Requeue and finish hooks are invoked in blk-mq without 5900 - * checking whether the involved request is actually still 5901 - * referenced in the scheduler. To handle this fact, the 5902 - * following two checks make this function exit in case of 5903 - * spurious invocations, for which there is nothing to do. 5904 - * 5905 - * First, check whether rq has nothing to do with an elevator. 5906 - */ 5907 - if (unlikely(!(rq->rq_flags & RQF_ELVPRIV))) 5908 - return; 5909 - 5910 - /* 5911 5899 * rq either is not associated with any icq, or is an already 5912 5900 * requeued request that has not (yet) been re-inserted into 5913 5901 * a bfq_queue.
+3 -1
block/bio.c
··· 879 879 struct bio_vec *bv = &bio->bi_io_vec[bio->bi_vcnt - 1]; 880 880 881 881 if (page_is_mergeable(bv, page, len, off, same_page)) { 882 - if (bio->bi_iter.bi_size > UINT_MAX - len) 882 + if (bio->bi_iter.bi_size > UINT_MAX - len) { 883 + *same_page = false; 883 884 return false; 885 + } 884 886 bv->bv_len += len; 885 887 bio->bi_iter.bi_size += len; 886 888 return true;
+1 -1
block/blk-mq-sched.h
··· 66 66 struct request_queue *q = rq->q; 67 67 struct elevator_queue *e = q->elevator; 68 68 69 - if (e && e->type->ops.requeue_request) 69 + if ((rq->rq_flags & RQF_ELVPRIV) && e && e->type->ops.requeue_request) 70 70 e->type->ops.requeue_request(rq); 71 71 } 72 72
+1 -1
block/partitions/core.c
··· 537 537 538 538 bdevp = bdget_disk(bdev->bd_disk, partno); 539 539 if (!bdevp) 540 - return -ENOMEM; 540 + return -ENXIO; 541 541 542 542 mutex_lock(&bdevp->bd_mutex); 543 543 mutex_lock_nested(&bdev->bd_mutex, 1);
-5
drivers/nvme/host/core.c
··· 3525 3525 { 3526 3526 struct nvme_ctrl *ctrl = dev_get_drvdata(dev); 3527 3527 3528 - /* Can't delete non-created controllers */ 3529 - if (!ctrl->created) 3530 - return -EBUSY; 3531 - 3532 3528 if (device_remove_file_self(dev, attr)) 3533 3529 nvme_delete_ctrl_sync(ctrl); 3534 3530 return count; ··· 4399 4403 nvme_queue_scan(ctrl); 4400 4404 nvme_start_queues(ctrl); 4401 4405 } 4402 - ctrl->created = true; 4403 4406 } 4404 4407 EXPORT_SYMBOL_GPL(nvme_start_ctrl); 4405 4408
+8 -4
drivers/nvme/host/fabrics.c
··· 565 565 struct nvme_request *req = nvme_req(rq); 566 566 567 567 /* 568 - * If we are in some state of setup or teardown only allow 569 - * internally generated commands. 568 + * currently we have a problem sending passthru commands 569 + * on the admin_q if the controller is not LIVE because we can't 570 + * make sure that they are going out after the admin connect, 571 + * controller enable and/or other commands in the initialization 572 + * sequence. until the controller will be LIVE, fail with 573 + * BLK_STS_RESOURCE so that they will be rescheduled. 570 574 */ 571 - if (!blk_rq_is_passthrough(rq) || (req->flags & NVME_REQ_USERCMD)) 575 + if (rq->q == ctrl->admin_q && (req->flags & NVME_REQ_USERCMD)) 572 576 return false; 573 577 574 578 /* ··· 581 577 */ 582 578 switch (ctrl->state) { 583 579 case NVME_CTRL_CONNECTING: 584 - if (nvme_is_fabrics(req->cmd) && 580 + if (blk_rq_is_passthrough(rq) && nvme_is_fabrics(req->cmd) && 585 581 req->cmd->fabrics.fctype == nvme_fabrics_type_connect) 586 582 return true; 587 583 break;
+1
drivers/nvme/host/fc.c
··· 2160 2160 struct nvme_fc_fcp_op *aen_op; 2161 2161 int i; 2162 2162 2163 + cancel_work_sync(&ctrl->ctrl.async_event_work); 2163 2164 aen_op = ctrl->aen_ops; 2164 2165 for (i = 0; i < NVME_NR_AEN_COMMANDS; i++, aen_op++) { 2165 2166 __nvme_fc_exit_request(ctrl, aen_op);
-1
drivers/nvme/host/nvme.h
··· 307 307 struct nvme_command ka_cmd; 308 308 struct work_struct fw_act_work; 309 309 unsigned long events; 310 - bool created; 311 310 312 311 #ifdef CONFIG_NVME_MULTIPATH 313 312 /* asymmetric namespace access: */
+1
drivers/nvme/host/rdma.c
··· 835 835 blk_mq_free_tag_set(ctrl->ctrl.admin_tagset); 836 836 } 837 837 if (ctrl->async_event_sqe.data) { 838 + cancel_work_sync(&ctrl->ctrl.async_event_work); 838 839 nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe, 839 840 sizeof(struct nvme_command), DMA_TO_DEVICE); 840 841 ctrl->async_event_sqe.data = NULL;
+1
drivers/nvme/host/tcp.c
··· 1596 1596 static void nvme_tcp_free_admin_queue(struct nvme_ctrl *ctrl) 1597 1597 { 1598 1598 if (to_tcp_ctrl(ctrl)->async_req.pdu) { 1599 + cancel_work_sync(&ctrl->async_event_work); 1599 1600 nvme_tcp_free_async_req(to_tcp_ctrl(ctrl)); 1600 1601 to_tcp_ctrl(ctrl)->async_req.pdu = NULL; 1601 1602 }