diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2011-10-30 10:17:09 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-10-30 10:16:45 -0400 |
commit | c8d1c0ff840bbf06c60ff4235202a4b1457d8f59 (patch) | |
tree | b183231aa76a1268141c68cf8566f9e07915800b /drivers/s390 | |
parent | 6ffed94ea73c0c15e3201d4d479b6efe8343fb96 (diff) |
[S390] dasd: prevent path verification before resume
Mark the device as suspended and delay execution of the path
verification worker to prevent mix-up.
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/block/dasd.c | 4 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 14 | ||||
-rw-r--r-- | drivers/s390/block/dasd_int.h | 1 |
3 files changed, 17 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index ce2a780a9ea..65894f05a80 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -3289,6 +3289,9 @@ int dasd_generic_pm_freeze(struct ccw_device *cdev) | |||
3289 | if (IS_ERR(device)) | 3289 | if (IS_ERR(device)) |
3290 | return PTR_ERR(device); | 3290 | return PTR_ERR(device); |
3291 | 3291 | ||
3292 | /* mark device as suspended */ | ||
3293 | set_bit(DASD_FLAG_SUSPENDED, &device->flags); | ||
3294 | |||
3292 | if (device->discipline->freeze) | 3295 | if (device->discipline->freeze) |
3293 | rc = device->discipline->freeze(device); | 3296 | rc = device->discipline->freeze(device); |
3294 | 3297 | ||
@@ -3363,6 +3366,7 @@ int dasd_generic_restore_device(struct ccw_device *cdev) | |||
3363 | if (device->block) | 3366 | if (device->block) |
3364 | dasd_schedule_block_bh(device->block); | 3367 | dasd_schedule_block_bh(device->block); |
3365 | 3368 | ||
3369 | clear_bit(DASD_FLAG_SUSPENDED, &device->flags); | ||
3366 | dasd_put_device(device); | 3370 | dasd_put_device(device); |
3367 | return 0; | 3371 | return 0; |
3368 | } | 3372 | } |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index cb1bbc2947e..cca25096efc 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -1101,6 +1101,12 @@ static void do_path_verification_work(struct work_struct *work) | |||
1101 | data = container_of(work, struct path_verification_work_data, worker); | 1101 | data = container_of(work, struct path_verification_work_data, worker); |
1102 | device = data->device; | 1102 | device = data->device; |
1103 | 1103 | ||
1104 | /* delay path verification until device was resumed */ | ||
1105 | if (test_bit(DASD_FLAG_SUSPENDED, &device->flags)) { | ||
1106 | schedule_work(work); | ||
1107 | return; | ||
1108 | } | ||
1109 | |||
1104 | opm = 0; | 1110 | opm = 0; |
1105 | npm = 0; | 1111 | npm = 0; |
1106 | ppm = 0; | 1112 | ppm = 0; |
@@ -2047,9 +2053,13 @@ static void dasd_eckd_check_for_device_change(struct dasd_device *device, | |||
2047 | /* first of all check for state change pending interrupt */ | 2053 | /* first of all check for state change pending interrupt */ |
2048 | mask = DEV_STAT_ATTENTION | DEV_STAT_DEV_END | DEV_STAT_UNIT_EXCEP; | 2054 | mask = DEV_STAT_ATTENTION | DEV_STAT_DEV_END | DEV_STAT_UNIT_EXCEP; |
2049 | if ((scsw_dstat(&irb->scsw) & mask) == mask) { | 2055 | if ((scsw_dstat(&irb->scsw) & mask) == mask) { |
2050 | /* for alias only and not in offline processing*/ | 2056 | /* |
2057 | * for alias only, not in offline processing | ||
2058 | * and only if not suspended | ||
2059 | */ | ||
2051 | if (!device->block && private->lcu && | 2060 | if (!device->block && private->lcu && |
2052 | !test_bit(DASD_FLAG_OFFLINE, &device->flags)) { | 2061 | !test_bit(DASD_FLAG_OFFLINE, &device->flags) && |
2062 | !test_bit(DASD_FLAG_SUSPENDED, &device->flags)) { | ||
2053 | /* | 2063 | /* |
2054 | * the state change could be caused by an alias | 2064 | * the state change could be caused by an alias |
2055 | * reassignment remove device from alias handling | 2065 | * reassignment remove device from alias handling |
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index 563bf8a25dc..afe8c33422e 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h | |||
@@ -516,6 +516,7 @@ struct dasd_block { | |||
516 | */ | 516 | */ |
517 | #define DASD_FLAG_IS_RESERVED 7 /* The device is reserved */ | 517 | #define DASD_FLAG_IS_RESERVED 7 /* The device is reserved */ |
518 | #define DASD_FLAG_LOCK_STOLEN 8 /* The device lock was stolen */ | 518 | #define DASD_FLAG_LOCK_STOLEN 8 /* The device lock was stolen */ |
519 | #define DASD_FLAG_SUSPENDED 9 /* The device was suspended */ | ||
519 | 520 | ||
520 | 521 | ||
521 | void dasd_put_device_wake(struct dasd_device *); | 522 | void dasd_put_device_wake(struct dasd_device *); |