提交 aade6c0d 编写于 作者: S Stefan Haberland 提交者: Martin Schwidefsky

[S390] dasd: prevent IO error during reserve/release loop

The termination of running CQR caused by reserve/release operations
may lead to an IO error if reserve/release is done in a tight loop.
Prevent this by increasing the retry counter after termination.
Signed-off-by: NStefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 fdb1bb15
......@@ -1742,11 +1742,20 @@ int dasd_sleep_on_interruptible(struct dasd_ccw_req *cqr)
static inline int _dasd_term_running_cqr(struct dasd_device *device)
{
struct dasd_ccw_req *cqr;
int rc;
if (list_empty(&device->ccw_queue))
return 0;
cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, devlist);
return device->discipline->term_IO(cqr);
rc = device->discipline->term_IO(cqr);
if (!rc)
/*
* CQR terminated because a more important request is pending.
* Undo decreasing of retry counter because this is
* not an error case.
*/
cqr->retries++;
return rc;
}
int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册