aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
authorStefan Weinhuber <wein@de.ibm.com>2009-09-11 04:28:28 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-09-11 04:29:41 -0400
commit97f604b07473669f4da52b1f859ee45e8d48d42a (patch)
treeb93604552144e1e743b988ce343ae35a9a5a6559 /drivers/s390/block
parent3ac276f8cb020adbbc3399c47edc1100748c2c16 (diff)
[S390] dasd: fail requests when device state is less then ready
A DASD device that is not ready or online has no defined disk layout, so all requests that arrive in such a state need to be returned as failed. Signed-off-by: Stefan Weinhuber <wein@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r--drivers/s390/block/dasd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 3f62dd50bbbe..f8445b8ff173 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -1699,8 +1699,11 @@ static void __dasd_process_request_queue(struct dasd_block *block)
1699 * for that. State DASD_STATE_ONLINE is normal block device 1699 * for that. State DASD_STATE_ONLINE is normal block device
1700 * operation. 1700 * operation.
1701 */ 1701 */
1702 if (basedev->state < DASD_STATE_READY) 1702 if (basedev->state < DASD_STATE_READY) {
1703 while ((req = blk_fetch_request(block->request_queue)))
1704 __blk_end_request_all(req, -EIO);
1703 return; 1705 return;
1706 }
1704 /* Now we try to fetch requests from the request queue */ 1707 /* Now we try to fetch requests from the request queue */
1705 while (!blk_queue_plugged(queue) && (req = blk_peek_request(queue))) { 1708 while (!blk_queue_plugged(queue) && (req = blk_peek_request(queue))) {
1706 if (basedev->features & DASD_FEATURE_READONLY && 1709 if (basedev->features & DASD_FEATURE_READONLY &&