s390/dasd: make query host access interruptible
authorStefan Haberland <sth@linux.vnet.ibm.com>
Thu, 22 Sep 2016 08:49:40 +0000 (10:49 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 26 Sep 2016 14:45:31 +0000 (16:45 +0200)
If the DASD device gets blocked for any reason, e.g. because it is reserved
somewhere, the host_access_count sysfs entry or the host_access_list
debugfs entry may sleep forever. Make it interruptible so that userspace
can use ^C to abort the operation.

Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd_eckd.c

index 98bbec44bcd05c0c37da4d853c17e2c525767c3e..831935af738966685415b0e2996dfb0c14af54b7 100644 (file)
@@ -5201,7 +5201,7 @@ static int dasd_eckd_query_host_access(struct dasd_device *device,
 
        cqr->buildclk = get_tod_clock();
        cqr->status = DASD_CQR_FILLED;
-       rc = dasd_sleep_on(cqr);
+       rc = dasd_sleep_on_interruptible(cqr);
        if (rc == 0) {
                *data = *host_access;
        } else {