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 'for-linus-20181201' of git://git.kernel.dk/linux-block

Pull block layer fixes from Jens Axboe:

- Single range elevator discard merge fix, that caused crashes (Ming)

- Fix for a regression in O_DIRECT, where we could potentially lose the
error value (Maximilian Heyne)

- NVMe pull request from Christoph, with little fixes all over the map
for NVMe.

* tag 'for-linus-20181201' of git://git.kernel.dk/linux-block:
block: fix single range discard merge
nvme-rdma: fix double freeing of async event data
nvme: flush namespace scanning work just before removing namespaces
nvme: warn when finding multi-port subsystems without multipathing enabled
fs: fix lost error code in dio_complete
nvme-pci: fix surprise removal
nvme-fc: initialize nvme_req(rq)->ctrl after calling __nvme_fc_init_request()
nvme: Free ctrl device name on init failure

+14 -7
+1 -1
block/blk-merge.c
··· 820 820 821 821 req->__data_len += blk_rq_bytes(next); 822 822 823 - if (req_op(req) != REQ_OP_DISCARD) 823 + if (!blk_discard_mergable(req)) 824 824 elv_merge_requests(q, req, next); 825 825 826 826 /*
+5 -3
drivers/nvme/host/core.c
··· 3314 3314 struct nvme_ns *ns, *next; 3315 3315 LIST_HEAD(ns_list); 3316 3316 3317 + /* prevent racing with ns scanning */ 3318 + flush_work(&ctrl->scan_work); 3319 + 3317 3320 /* 3318 3321 * The dead states indicates the controller was not gracefully 3319 3322 * disconnected. In that case, we won't be able to flush any data while ··· 3479 3476 nvme_mpath_stop(ctrl); 3480 3477 nvme_stop_keep_alive(ctrl); 3481 3478 flush_work(&ctrl->async_event_work); 3482 - flush_work(&ctrl->scan_work); 3483 3479 cancel_work_sync(&ctrl->fw_act_work); 3484 3480 if (ctrl->ops->stop_ctrl) 3485 3481 ctrl->ops->stop_ctrl(ctrl); ··· 3587 3585 3588 3586 return 0; 3589 3587 out_free_name: 3590 - kfree_const(dev->kobj.name); 3588 + kfree_const(ctrl->device->kobj.name); 3591 3589 out_release_instance: 3592 3590 ida_simple_remove(&nvme_instance_ida, ctrl->instance); 3593 3591 out: ··· 3609 3607 down_read(&ctrl->namespaces_rwsem); 3610 3608 3611 3609 /* Forcibly unquiesce queues to avoid blocking dispatch */ 3612 - if (ctrl->admin_q) 3610 + if (ctrl->admin_q && !blk_queue_dying(ctrl->admin_q)) 3613 3611 blk_mq_unquiesce_queue(ctrl->admin_q); 3614 3612 3615 3613 list_for_each_entry(ns, &ctrl->namespaces, list)
+1 -1
drivers/nvme/host/fc.c
··· 1752 1752 struct nvme_fc_queue *queue = &ctrl->queues[queue_idx]; 1753 1753 int res; 1754 1754 1755 - nvme_req(rq)->ctrl = &ctrl->ctrl; 1756 1755 res = __nvme_fc_init_request(ctrl, queue, &op->op, rq, queue->rqcnt++); 1757 1756 if (res) 1758 1757 return res; 1759 1758 op->op.fcp_req.first_sgl = &op->sgl[0]; 1760 1759 op->op.fcp_req.private = &op->priv[0]; 1760 + nvme_req(rq)->ctrl = &ctrl->ctrl; 1761 1761 return res; 1762 1762 } 1763 1763
+3
drivers/nvme/host/nvme.h
··· 531 531 static inline int nvme_mpath_init(struct nvme_ctrl *ctrl, 532 532 struct nvme_id_ctrl *id) 533 533 { 534 + if (ctrl->subsys->cmic & (1 << 3)) 535 + dev_warn(ctrl->device, 536 + "Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n"); 534 537 return 0; 535 538 } 536 539 static inline void nvme_mpath_uninit(struct nvme_ctrl *ctrl)
+2
drivers/nvme/host/rdma.c
··· 184 184 qe->dma = ib_dma_map_single(ibdev, qe->data, capsule_size, dir); 185 185 if (ib_dma_mapping_error(ibdev, qe->dma)) { 186 186 kfree(qe->data); 187 + qe->data = NULL; 187 188 return -ENOMEM; 188 189 } 189 190 ··· 824 823 out_free_async_qe: 825 824 nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe, 826 825 sizeof(struct nvme_command), DMA_TO_DEVICE); 826 + ctrl->async_event_sqe.data = NULL; 827 827 out_free_queue: 828 828 nvme_rdma_free_queue(&ctrl->queues[0]); 829 829 return error;
+2 -2
fs/direct-io.c
··· 325 325 */ 326 326 dio->iocb->ki_pos += transferred; 327 327 328 - if (dio->op == REQ_OP_WRITE) 329 - ret = generic_write_sync(dio->iocb, transferred); 328 + if (ret > 0 && dio->op == REQ_OP_WRITE) 329 + ret = generic_write_sync(dio->iocb, ret); 330 330 dio->iocb->ki_complete(dio->iocb, ret, 0); 331 331 } 332 332