Commit 97f604b0 authored by Stefan Weinhuber's avatar Stefan Weinhuber Committed by Martin Schwidefsky

[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: default avatarStefan Weinhuber <wein@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 3ac276f8
...@@ -1699,8 +1699,11 @@ static void __dasd_process_request_queue(struct dasd_block *block) ...@@ -1699,8 +1699,11 @@ static void __dasd_process_request_queue(struct dasd_block *block)
* for that. State DASD_STATE_ONLINE is normal block device * for that. State DASD_STATE_ONLINE is normal block device
* operation. * operation.
*/ */
if (basedev->state < DASD_STATE_READY) if (basedev->state < DASD_STATE_READY) {
while ((req = blk_fetch_request(block->request_queue)))
__blk_end_request_all(req, -EIO);
return; return;
}
/* Now we try to fetch requests from the request queue */ /* Now we try to fetch requests from the request queue */
while (!blk_queue_plugged(queue) && (req = blk_peek_request(queue))) { while (!blk_queue_plugged(queue) && (req = blk_peek_request(queue))) {
if (basedev->features & DASD_FEATURE_READONLY && if (basedev->features & DASD_FEATURE_READONLY &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment