aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd.c16
-rw-r--r--drivers/s390/char/tape_block.c7
2 files changed, 7 insertions, 16 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 7df03c7aea0d..e64f62d5e0fc 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -1656,17 +1656,13 @@ static void __dasd_process_request_queue(struct dasd_block *block)
1656 if (basedev->state < DASD_STATE_READY) 1656 if (basedev->state < DASD_STATE_READY)
1657 return; 1657 return;
1658 /* Now we try to fetch requests from the request queue */ 1658 /* Now we try to fetch requests from the request queue */
1659 while (!blk_queue_plugged(queue) && 1659 while (!blk_queue_plugged(queue) && (req = blk_peek_request(queue))) {
1660 elv_next_request(queue)) {
1661
1662 req = elv_next_request(queue);
1663
1664 if (basedev->features & DASD_FEATURE_READONLY && 1660 if (basedev->features & DASD_FEATURE_READONLY &&
1665 rq_data_dir(req) == WRITE) { 1661 rq_data_dir(req) == WRITE) {
1666 DBF_DEV_EVENT(DBF_ERR, basedev, 1662 DBF_DEV_EVENT(DBF_ERR, basedev,
1667 "Rejecting write request %p", 1663 "Rejecting write request %p",
1668 req); 1664 req);
1669 blkdev_dequeue_request(req); 1665 blk_start_request(req);
1670 __blk_end_request_all(req, -EIO); 1666 __blk_end_request_all(req, -EIO);
1671 continue; 1667 continue;
1672 } 1668 }
@@ -1695,7 +1691,7 @@ static void __dasd_process_request_queue(struct dasd_block *block)
1695 "CCW creation failed (rc=%ld) " 1691 "CCW creation failed (rc=%ld) "
1696 "on request %p", 1692 "on request %p",
1697 PTR_ERR(cqr), req); 1693 PTR_ERR(cqr), req);
1698 blkdev_dequeue_request(req); 1694 blk_start_request(req);
1699 __blk_end_request_all(req, -EIO); 1695 __blk_end_request_all(req, -EIO);
1700 continue; 1696 continue;
1701 } 1697 }
@@ -1705,7 +1701,7 @@ static void __dasd_process_request_queue(struct dasd_block *block)
1705 */ 1701 */
1706 cqr->callback_data = (void *) req; 1702 cqr->callback_data = (void *) req;
1707 cqr->status = DASD_CQR_FILLED; 1703 cqr->status = DASD_CQR_FILLED;
1708 blkdev_dequeue_request(req); 1704 blk_start_request(req);
1709 list_add_tail(&cqr->blocklist, &block->ccw_queue); 1705 list_add_tail(&cqr->blocklist, &block->ccw_queue);
1710 dasd_profile_start(block, cqr, req); 1706 dasd_profile_start(block, cqr, req);
1711 } 1707 }
@@ -2029,10 +2025,8 @@ static void dasd_flush_request_queue(struct dasd_block *block)
2029 return; 2025 return;
2030 2026
2031 spin_lock_irq(&block->request_queue_lock); 2027 spin_lock_irq(&block->request_queue_lock);
2032 while ((req = elv_next_request(block->request_queue))) { 2028 while ((req = blk_fetch_request(block->request_queue)))
2033 blkdev_dequeue_request(req);
2034 __blk_end_request_all(req, -EIO); 2029 __blk_end_request_all(req, -EIO);
2035 }
2036 spin_unlock_irq(&block->request_queue_lock); 2030 spin_unlock_irq(&block->request_queue_lock);
2037} 2031}
2038 2032
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c
index 5d035e4939dc..1e7967675980 100644
--- a/drivers/s390/char/tape_block.c
+++ b/drivers/s390/char/tape_block.c
@@ -93,7 +93,7 @@ __tapeblock_end_request(struct tape_request *ccw_req, void *data)
93 device->blk_data.block_position = -1; 93 device->blk_data.block_position = -1;
94 device->discipline->free_bread(ccw_req); 94 device->discipline->free_bread(ccw_req);
95 if (!list_empty(&device->req_queue) || 95 if (!list_empty(&device->req_queue) ||
96 elv_next_request(device->blk_data.request_queue)) 96 blk_peek_request(device->blk_data.request_queue))
97 tapeblock_trigger_requeue(device); 97 tapeblock_trigger_requeue(device);
98} 98}
99 99
@@ -162,19 +162,16 @@ tapeblock_requeue(struct work_struct *work) {
162 spin_lock_irq(&device->blk_data.request_queue_lock); 162 spin_lock_irq(&device->blk_data.request_queue_lock);
163 while ( 163 while (
164 !blk_queue_plugged(queue) && 164 !blk_queue_plugged(queue) &&
165 elv_next_request(queue) && 165 (req = blk_fetch_request(queue)) &&
166 nr_queued < TAPEBLOCK_MIN_REQUEUE 166 nr_queued < TAPEBLOCK_MIN_REQUEUE
167 ) { 167 ) {
168 req = elv_next_request(queue);
169 if (rq_data_dir(req) == WRITE) { 168 if (rq_data_dir(req) == WRITE) {
170 DBF_EVENT(1, "TBLOCK: Rejecting write request\n"); 169 DBF_EVENT(1, "TBLOCK: Rejecting write request\n");
171 blkdev_dequeue_request(req);
172 spin_unlock_irq(&device->blk_data.request_queue_lock); 170 spin_unlock_irq(&device->blk_data.request_queue_lock);
173 blk_end_request_all(req, -EIO); 171 blk_end_request_all(req, -EIO);
174 spin_lock_irq(&device->blk_data.request_queue_lock); 172 spin_lock_irq(&device->blk_data.request_queue_lock);
175 continue; 173 continue;
176 } 174 }
177 blkdev_dequeue_request(req);
178 nr_queued++; 175 nr_queued++;
179 spin_unlock_irq(&device->blk_data.request_queue_lock); 176 spin_unlock_irq(&device->blk_data.request_queue_lock);
180 rc = tapeblock_start_request(device, req); 177 rc = tapeblock_start_request(device, req);