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 final final block IO fixes from Jens Axboe:
"Yes, the last round was final. This one is final final.

The mtip32xx fix could have waited, but it's so simple and gets rid of
two warning spewages on load. The two block flush fixes are critical
for blk-mq, and are the primary reason for this late pull request"

* 'for-linus' of git://git.kernel.dk/linux-block:
mtip32xx: fix bad use of smp_processor_id()
block: change flush sequence list addition back to front add
block: fix q->flush_rq NULL pointer crash on dm-mpath flush

+14 -16
+6 -11
block/blk-core.c
··· 693 693 if (!uninit_q) 694 694 return NULL; 695 695 696 - uninit_q->flush_rq = kzalloc(sizeof(struct request), GFP_KERNEL); 697 - if (!uninit_q->flush_rq) 698 - goto out_cleanup_queue; 699 - 700 696 q = blk_init_allocated_queue(uninit_q, rfn, lock); 701 697 if (!q) 702 - goto out_free_flush_rq; 703 - return q; 698 + blk_cleanup_queue(uninit_q); 704 699 705 - out_free_flush_rq: 706 - kfree(uninit_q->flush_rq); 707 - out_cleanup_queue: 708 - blk_cleanup_queue(uninit_q); 709 - return NULL; 700 + return q; 710 701 } 711 702 EXPORT_SYMBOL(blk_init_queue_node); 712 703 ··· 706 715 spinlock_t *lock) 707 716 { 708 717 if (!q) 718 + return NULL; 719 + 720 + q->flush_rq = kzalloc(sizeof(struct request), GFP_KERNEL); 721 + if (!q->flush_rq) 709 722 return NULL; 710 723 711 724 if (blk_init_rl(&q->root_rl, q, GFP_KERNEL))
+7 -4
block/blk-flush.c
··· 140 140 blk_mq_insert_request(rq, false, true, false); 141 141 } 142 142 143 - static bool blk_flush_queue_rq(struct request *rq) 143 + static bool blk_flush_queue_rq(struct request *rq, bool add_front) 144 144 { 145 145 if (rq->q->mq_ops) { 146 146 INIT_WORK(&rq->mq_flush_work, mq_flush_run); 147 147 kblockd_schedule_work(rq->q, &rq->mq_flush_work); 148 148 return false; 149 149 } else { 150 - list_add_tail(&rq->queuelist, &rq->q->queue_head); 150 + if (add_front) 151 + list_add(&rq->queuelist, &rq->q->queue_head); 152 + else 153 + list_add_tail(&rq->queuelist, &rq->q->queue_head); 151 154 return true; 152 155 } 153 156 } ··· 196 193 197 194 case REQ_FSEQ_DATA: 198 195 list_move_tail(&rq->flush.list, &q->flush_data_in_flight); 199 - queued = blk_flush_queue_rq(rq); 196 + queued = blk_flush_queue_rq(rq, true); 200 197 break; 201 198 202 199 case REQ_FSEQ_DONE: ··· 329 326 q->flush_rq->rq_disk = first_rq->rq_disk; 330 327 q->flush_rq->end_io = flush_end_io; 331 328 332 - return blk_flush_queue_rq(q->flush_rq); 329 + return blk_flush_queue_rq(q->flush_rq, false); 333 330 } 334 331 335 332 static void flush_data_end_io(struct request *rq, int error)
+1 -1
drivers/block/mtip32xx/mtip32xx.c
··· 4498 4498 } 4499 4499 dev_info(&pdev->dev, "NUMA node %d (closest: %d,%d, probe on %d:%d)\n", 4500 4500 my_node, pcibus_to_node(pdev->bus), dev_to_node(&pdev->dev), 4501 - cpu_to_node(smp_processor_id()), smp_processor_id()); 4501 + cpu_to_node(raw_smp_processor_id()), raw_smp_processor_id()); 4502 4502 4503 4503 dd = kzalloc_node(sizeof(struct driver_data), GFP_KERNEL, my_node); 4504 4504 if (dd == NULL) {