diff options
author | ken <ken@FreeBSD.org> | 2012-01-25 17:58:47 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 2012-01-25 17:58:47 +0000 |
commit | 8a0fb91f0a14e669b4b24f7b4b304dce2e57ff75 (patch) | |
tree | 584e1d9075da5efc6ea9a8a029b01b47faefc7f4 /sys/cam | |
parent | 203029c5bfebcaa570e737934e67a8d964ad6cb0 (diff) | |
download | FreeBSD-src-8a0fb91f0a14e669b4b24f7b4b304dce2e57ff75.zip FreeBSD-src-8a0fb91f0a14e669b4b24f7b4b304dce2e57ff75.tar.gz |
Fix a bug introduced in r230000. We were eliminating all LUNs on a target
in response to CAM_DEV_NOT_THERE, instead of just the LUN in question.
This will now just eliminate the specified LUN in response to
CAM_DEV_NOT_THERE.
Reported by: Richard Todd <rmtodd@servalan.servalan.com>
MFC after: 3 days
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/cam_periph.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index bd8bf27..bf8d4cc 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -1864,13 +1864,26 @@ cam_periph_error(union ccb *ccb, cam_flags camflags, case CAM_DEV_NOT_THERE: { struct cam_path *newpath; + lun_id_t lun_id; error = ENXIO; + + /* + * For a selection timeout, we consider all of the LUNs on + * the target to be gone. If the status is CAM_DEV_NOT_THERE, + * then we only get rid of the device(s) specified by the + * path in the original CCB. + */ + if (status == CAM_DEV_NOT_THERE) + lun_id = xpt_path_lun_id(ccb->ccb_h.path); + else + lun_id = CAM_LUN_WILDCARD; + /* Should we do more if we can't create the path?? */ if (xpt_create_path(&newpath, periph, xpt_path_path_id(ccb->ccb_h.path), xpt_path_target_id(ccb->ccb_h.path), - CAM_LUN_WILDCARD) != CAM_REQ_CMP) + lun_id) != CAM_REQ_CMP) break; /* |