Date: Wed, 25 Jan 2012 17:58:47 +0000 (UTC) From: "Kenneth D. Merry" <ken@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r230544 - head/sys/cam Message-ID: <201201251758.q0PHwlsO036653@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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; /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201251758.q0PHwlsO036653>