diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2015-08-07 13:19:03 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-08-09 21:07:41 +0200 |
commit | 1eb38023ddb480276c6b75e0db6463c47251eb7b (patch) | |
tree | ebc33843fee8087c2dc69fafe3aa7c58378e270c /drivers/s390/block/dasd_eckd.c | |
parent | aad1b688c996b4a247c4a8fd1bd6c5c563963ddb (diff) |
s390/dasd: fix failing path verification
DASD path verification requires the usage of sleep_on_immediatly to
ensure that no other I/O request is blocking the recovery of
disconnected devices. But two concurrent path verification workers for
the same device may kill each others requests due to the usage of the
immediate sleep_on function. This may lead to unsuccessful path
verifications.
Prevent that two parallel path verification workers conflict with
each other by implementing a device flag signalling a already running
worker.
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_eckd.c')
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 6215f6455eb8..d8144513fadc 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c @@ -1259,7 +1259,11 @@ static void do_path_verification_work(struct work_struct *work) schedule_work(work); return; } - + /* check if path verification already running and delay if so */ + if (test_and_set_bit(DASD_FLAG_PATH_VERIFY, &device->flags)) { + schedule_work(work); + return; + } opm = 0; npm = 0; ppm = 0; @@ -1402,7 +1406,7 @@ static void do_path_verification_work(struct work_struct *work) device->path_data.hpfpm |= hpfpm; spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); } - + clear_bit(DASD_FLAG_PATH_VERIFY, &device->flags); dasd_put_device(device); if (data->isglobal) mutex_unlock(&dasd_path_verification_mutex); |