Mercurial > illumos > illumos-gate
changeset 10033:fbf01e219914
6774092 Unable to unconfigure tape device encounting I/O error after FC cable is pulled.
author | rn150214@onnv-x86-build-new |
---|---|
date | Fri, 03 Jul 2009 05:51:28 +0530 |
parents | 087ec449fca8 |
children | 5a676578aeda |
files | usr/src/uts/common/io/scsi/targets/st.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/scsi/targets/st.c Fri Jul 03 13:30:39 2009 +0530 +++ b/usr/src/uts/common/io/scsi/targets/st.c Fri Jul 03 05:51:28 2009 +0530 @@ -1308,11 +1308,13 @@ */ if ((un->un_dev) && /* Been opened since attach */ (result != EACCES) && /* drive is use by somebody */ - (((un->un_pos.pmode == legacy) && + ((((un->un_pos.pmode == legacy) && (un->un_pos.fileno > 0) || /* Known position not rewound */ (un->un_pos.blkno != 0)) || /* Or within first file */ ((un->un_pos.pmode == logical) && - (un->un_pos.lgclblkno > 0)))) { + (un->un_pos.lgclblkno > 0))) && + ((un->un_state != ST_STATE_CLOSED) && + (un->un_laststate != ST_STATE_CLOSING)))) { ST_DEBUG(ST_DEVINFO, st_label, SCSI_DEBUG, "cannot detach: pmode=%d fileno=0x%x, blkno=0x%x"