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
This commit is contained in:
parent
704523b073
commit
6e4e0e26f1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=230544
@ -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;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user