svn commit: r230544 - head/sys/cam
Kenneth D. Merry
ken at FreeBSD.org
Wed Jan 25 17:58:48 UTC 2012
Author: ken
Date: Wed Jan 25 17:58:47 2012
New Revision: 230544
URL: http://svn.freebsd.org/changeset/base/230544
Log:
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 at servalan.servalan.com>
MFC after: 3 days
Modified:
head/sys/cam/cam_periph.c
Modified: head/sys/cam/cam_periph.c
==============================================================================
--- head/sys/cam/cam_periph.c Wed Jan 25 16:00:00 2012 (r230543)
+++ head/sys/cam/cam_periph.c Wed Jan 25 17:58:47 2012 (r230544)
@@ -1864,13 +1864,26 @@ cam_periph_error(union ccb *ccb, cam_fla
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;
/*
More information about the svn-src-head
mailing list