diff options
author | Stefan Weinhuber <wein@de.ibm.com> | 2011-01-05 06:48:04 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2011-01-05 06:47:30 -0500 |
commit | 5a27e60dec59a95bd7f8ae9a19ae2ede4f76395b (patch) | |
tree | 20595cba0caebf7a8a5f0afac9785c7d717f3e8c /drivers/s390/block/dasd_fba.c | |
parent | a4d26c6aeceea330ee5e0fb6b017d57e3b252d29 (diff) |
[S390] dasd: Improve handling of stolen DASD reservation
If a DASD device has been reserved by a Linux system, and later
this reservation is ‘stolen’ by a second system by means of an
unconditional reserve, then the first system receives a
notification about this fact. With this patch such an event can
be either ignored, as before, or it can be used to let the device
fail all I/O request, so that the device will not block anymore.
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_fba.c')
-rw-r--r-- | drivers/s390/block/dasd_fba.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index 86bacda2c5f6..be89b3a893da 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c | |||
@@ -233,24 +233,16 @@ dasd_fba_erp_postaction(struct dasd_ccw_req * cqr) | |||
233 | return NULL; | 233 | return NULL; |
234 | } | 234 | } |
235 | 235 | ||
236 | static void dasd_fba_handle_unsolicited_interrupt(struct dasd_device *device, | 236 | static void dasd_fba_check_for_device_change(struct dasd_device *device, |
237 | struct irb *irb) | 237 | struct dasd_ccw_req *cqr, |
238 | struct irb *irb) | ||
238 | { | 239 | { |
239 | char mask; | 240 | char mask; |
240 | 241 | ||
241 | /* first of all check for state change pending interrupt */ | 242 | /* first of all check for state change pending interrupt */ |
242 | mask = DEV_STAT_ATTENTION | DEV_STAT_DEV_END | DEV_STAT_UNIT_EXCEP; | 243 | mask = DEV_STAT_ATTENTION | DEV_STAT_DEV_END | DEV_STAT_UNIT_EXCEP; |
243 | if ((irb->scsw.cmd.dstat & mask) == mask) { | 244 | if ((irb->scsw.cmd.dstat & mask) == mask) |
244 | dasd_generic_handle_state_change(device); | 245 | dasd_generic_handle_state_change(device); |
245 | return; | ||
246 | } | ||
247 | |||
248 | /* check for unsolicited interrupts */ | ||
249 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", | ||
250 | "unsolicited interrupt received"); | ||
251 | device->discipline->dump_sense_dbf(device, irb, "unsolicited"); | ||
252 | dasd_schedule_device_bh(device); | ||
253 | return; | ||
254 | }; | 246 | }; |
255 | 247 | ||
256 | static struct dasd_ccw_req *dasd_fba_build_cp(struct dasd_device * memdev, | 248 | static struct dasd_ccw_req *dasd_fba_build_cp(struct dasd_device * memdev, |
@@ -605,7 +597,7 @@ static struct dasd_discipline dasd_fba_discipline = { | |||
605 | .handle_terminated_request = dasd_fba_handle_terminated_request, | 597 | .handle_terminated_request = dasd_fba_handle_terminated_request, |
606 | .erp_action = dasd_fba_erp_action, | 598 | .erp_action = dasd_fba_erp_action, |
607 | .erp_postaction = dasd_fba_erp_postaction, | 599 | .erp_postaction = dasd_fba_erp_postaction, |
608 | .handle_unsolicited_interrupt = dasd_fba_handle_unsolicited_interrupt, | 600 | .check_for_device_change = dasd_fba_check_for_device_change, |
609 | .build_cp = dasd_fba_build_cp, | 601 | .build_cp = dasd_fba_build_cp, |
610 | .free_cp = dasd_fba_free_cp, | 602 | .free_cp = dasd_fba_free_cp, |
611 | .dump_sense = dasd_fba_dump_sense, | 603 | .dump_sense = dasd_fba_dump_sense, |