diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2011-12-01 07:32:20 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-12-01 07:32:18 -0500 |
commit | 659213b899f389d3a1e211796713ceaaa280fa44 (patch) | |
tree | 730f1ab0d4124f8783f7a83afea67b762e2007e6 | |
parent | 817e5000ebc4d448ca514db49b55073a724f8552 (diff) |
[S390] cio: disallow driver io for known to be broken paths
When a driver requests to do IO, we will adjust the mask of
paths to be used to exclude varied offline paths.
Drivers trying to do IO solely on paths which are online but some
way defective may lack the information to do proper error handling.
There is no reason to allow the usage of known to be broken paths.
Thus restrict the paths a ccw driver can use for IO to a subset of
the paths cio found usable (this also excludes offline paths).
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | drivers/s390/cio/device_ops.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index f98698d5735e..41c21ad0d5f2 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -213,9 +213,9 @@ int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa, | |||
213 | ret = cio_set_options (sch, flags); | 213 | ret = cio_set_options (sch, flags); |
214 | if (ret) | 214 | if (ret) |
215 | return ret; | 215 | return ret; |
216 | /* Adjust requested path mask to excluded varied off paths. */ | 216 | /* Adjust requested path mask to exclude unusable paths. */ |
217 | if (lpm) { | 217 | if (lpm) { |
218 | lpm &= sch->opm; | 218 | lpm &= sch->lpm; |
219 | if (lpm == 0) | 219 | if (lpm == 0) |
220 | return -EACCES; | 220 | return -EACCES; |
221 | } | 221 | } |
@@ -607,9 +607,9 @@ int ccw_device_tm_start_key(struct ccw_device *cdev, struct tcw *tcw, | |||
607 | return -EINVAL; | 607 | return -EINVAL; |
608 | if (cdev->private->state != DEV_STATE_ONLINE) | 608 | if (cdev->private->state != DEV_STATE_ONLINE) |
609 | return -EIO; | 609 | return -EIO; |
610 | /* Adjust requested path mask to excluded varied off paths. */ | 610 | /* Adjust requested path mask to exclude unusable paths. */ |
611 | if (lpm) { | 611 | if (lpm) { |
612 | lpm &= sch->opm; | 612 | lpm &= sch->lpm; |
613 | if (lpm == 0) | 613 | if (lpm == 0) |
614 | return -EACCES; | 614 | return -EACCES; |
615 | } | 615 | } |