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

Pull more block layer fixes from Jens Axboe:
"I wasn't going to send off a new pull before next week, but the blk
flush fix from Jan from the other day introduced a regression. It's
rare enough not to have hit during testing, since it requires both a
device that rejects the first flush, and bad timing while it does
that. But since someone did hit it, let's get the revert into 4.4-rc3
so we don't have a released rc with that known issue.

Apart from that revert, three other fixes:

- From Christoph, a fix for a missing unmap in NVMe request
preparation.

- An NVMe fix from Nishanth that fixes data corruption on powerpc.

- Also from Christoph, fix a list_del() attempt on blk-mq that didn't
have a matching list_add() at timer start"

* 'for-linus' of git://git.kernel.dk/linux-block:
Revert "blk-flush: Queue through IO scheduler when flush not required"
block: fix blk_abort_request for blk-mq drivers
nvme: add missing unmaps in nvme_queue_rq
NVMe: default to 4k device page size

+24 -16
+1 -1
block/blk-flush.c
··· 422 422 if (q->mq_ops) { 423 423 blk_mq_insert_request(rq, false, false, true); 424 424 } else 425 - q->elevator->type->ops.elevator_add_req_fn(q, rq); 425 + list_add_tail(&rq->queuelist, &q->queue_head); 426 426 return; 427 427 } 428 428
+5 -3
block/blk-timeout.c
··· 158 158 { 159 159 if (blk_mark_rq_complete(req)) 160 160 return; 161 - blk_delete_timer(req); 162 - if (req->q->mq_ops) 161 + 162 + if (req->q->mq_ops) { 163 163 blk_mq_rq_timed_out(req, false); 164 - else 164 + } else { 165 + blk_delete_timer(req); 165 166 blk_rq_timed_out(req); 167 + } 166 168 } 167 169 EXPORT_SYMBOL_GPL(blk_abort_request); 168 170
+18 -12
drivers/nvme/host/pci.c
··· 896 896 goto retry_cmd; 897 897 } 898 898 if (blk_integrity_rq(req)) { 899 - if (blk_rq_count_integrity_sg(req->q, req->bio) != 1) 899 + if (blk_rq_count_integrity_sg(req->q, req->bio) != 1) { 900 + dma_unmap_sg(dev->dev, iod->sg, iod->nents, 901 + dma_dir); 900 902 goto error_cmd; 903 + } 901 904 902 905 sg_init_table(iod->meta_sg, 1); 903 906 if (blk_rq_map_integrity_sg( 904 - req->q, req->bio, iod->meta_sg) != 1) 907 + req->q, req->bio, iod->meta_sg) != 1) { 908 + dma_unmap_sg(dev->dev, iod->sg, iod->nents, 909 + dma_dir); 905 910 goto error_cmd; 911 + } 906 912 907 913 if (rq_data_dir(req)) 908 914 nvme_dif_remap(req, nvme_dif_prep); 909 915 910 - if (!dma_map_sg(nvmeq->q_dmadev, iod->meta_sg, 1, dma_dir)) 916 + if (!dma_map_sg(nvmeq->q_dmadev, iod->meta_sg, 1, dma_dir)) { 917 + dma_unmap_sg(dev->dev, iod->sg, iod->nents, 918 + dma_dir); 911 919 goto error_cmd; 920 + } 912 921 } 913 922 } 914 923 ··· 1737 1728 u32 aqa; 1738 1729 u64 cap = lo_hi_readq(&dev->bar->cap); 1739 1730 struct nvme_queue *nvmeq; 1740 - unsigned page_shift = PAGE_SHIFT; 1731 + /* 1732 + * default to a 4K page size, with the intention to update this 1733 + * path in the future to accomodate architectures with differing 1734 + * kernel and IO page sizes. 1735 + */ 1736 + unsigned page_shift = 12; 1741 1737 unsigned dev_page_min = NVME_CAP_MPSMIN(cap) + 12; 1742 - unsigned dev_page_max = NVME_CAP_MPSMAX(cap) + 12; 1743 1738 1744 1739 if (page_shift < dev_page_min) { 1745 1740 dev_err(dev->dev, ··· 1751 1738 "host (%u)\n", 1 << dev_page_min, 1752 1739 1 << page_shift); 1753 1740 return -ENODEV; 1754 - } 1755 - if (page_shift > dev_page_max) { 1756 - dev_info(dev->dev, 1757 - "Device maximum page size (%u) smaller than " 1758 - "host (%u); enabling work-around\n", 1759 - 1 << dev_page_max, 1 << page_shift); 1760 - page_shift = dev_page_max; 1761 1741 } 1762 1742 1763 1743 dev->subsystem = readl(&dev->bar->vs) >= NVME_VS(1, 1) ?