Make camcontrol hpa
and camcontrol ama
trigger reprobe.
This makes OS automatically see the disk's new disk size. MFC after: 2 weeks Sponsored by: iXsystems, Inc.
This commit is contained in:
parent
88880fd4cf
commit
0642bc1cbb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=350257
@ -301,6 +301,7 @@ static int scsiserial(struct cam_device *device, int task_attr,
|
|||||||
int retry_count, int timeout);
|
int retry_count, int timeout);
|
||||||
static int parse_btl(char *tstr, path_id_t *bus, target_id_t *target,
|
static int parse_btl(char *tstr, path_id_t *bus, target_id_t *target,
|
||||||
lun_id_t *lun, cam_argmask *arglst);
|
lun_id_t *lun, cam_argmask *arglst);
|
||||||
|
static int reprobe(struct cam_device *device);
|
||||||
static int dorescan_or_reset(int argc, char **argv, int rescan);
|
static int dorescan_or_reset(int argc, char **argv, int rescan);
|
||||||
static int rescan_or_reset_bus(path_id_t bus, int rescan);
|
static int rescan_or_reset_bus(path_id_t bus, int rescan);
|
||||||
static int scanlun_or_reset_dev(path_id_t bus, target_id_t target,
|
static int scanlun_or_reset_dev(path_id_t bus, target_id_t target,
|
||||||
@ -371,7 +372,6 @@ static int scsiprintopcodes(struct cam_device *device, int td_req, uint8_t *buf,
|
|||||||
static int scsiopcodes(struct cam_device *device, int argc, char **argv,
|
static int scsiopcodes(struct cam_device *device, int argc, char **argv,
|
||||||
char *combinedopt, int task_attr, int retry_count,
|
char *combinedopt, int task_attr, int retry_count,
|
||||||
int timeout, int verbose);
|
int timeout, int verbose);
|
||||||
static int scsireprobe(struct cam_device *device);
|
|
||||||
|
|
||||||
#ifndef min
|
#ifndef min
|
||||||
#define min(a,b) (((a)<(b))?(a):(b))
|
#define min(a,b) (((a)<(b))?(a):(b))
|
||||||
@ -3094,6 +3094,8 @@ atahpa(struct cam_device *device, int retry_count, int timeout,
|
|||||||
timeout, ccb,
|
timeout, ccb,
|
||||||
&ident_buf);
|
&ident_buf);
|
||||||
atahpa_print(ident_buf, hpasize, 1);
|
atahpa_print(ident_buf, hpasize, 1);
|
||||||
|
/* Hint CAM to reprobe the device. */
|
||||||
|
reprobe(device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -3236,6 +3238,8 @@ ataama(struct cam_device *device, int retry_count, int timeout,
|
|||||||
error = ata_do_identify(device, retry_count,
|
error = ata_do_identify(device, retry_count,
|
||||||
timeout, ccb, &ident_buf);
|
timeout, ccb, &ident_buf);
|
||||||
ataama_print(ident_buf, nativesize, 1);
|
ataama_print(ident_buf, nativesize, 1);
|
||||||
|
/* Hint CAM to reprobe the device. */
|
||||||
|
reprobe(device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -9774,7 +9778,7 @@ scsiopcodes(struct cam_device *device, int argc, char **argv,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
scsireprobe(struct cam_device *device)
|
reprobe(struct cam_device *device)
|
||||||
{
|
{
|
||||||
union ccb *ccb;
|
union ccb *ccb;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
@ -9786,7 +9790,7 @@ scsireprobe(struct cam_device *device)
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
|
CCB_CLEAR_ALL_EXCEPT_HDR(ccb);
|
||||||
|
|
||||||
ccb->ccb_h.func_code = XPT_REPROBE_LUN;
|
ccb->ccb_h.func_code = XPT_REPROBE_LUN;
|
||||||
|
|
||||||
@ -10538,7 +10542,7 @@ main(int argc, char **argv)
|
|||||||
arglist & CAM_ARG_VERBOSE);
|
arglist & CAM_ARG_VERBOSE);
|
||||||
break;
|
break;
|
||||||
case CAM_CMD_REPROBE:
|
case CAM_CMD_REPROBE:
|
||||||
error = scsireprobe(cam_dev);
|
error = reprobe(cam_dev);
|
||||||
break;
|
break;
|
||||||
case CAM_CMD_ZONE:
|
case CAM_CMD_ZONE:
|
||||||
error = zone(cam_dev, argc, argv, combinedopt,
|
error = zone(cam_dev, argc, argv, combinedopt,
|
||||||
|
Loading…
Reference in New Issue
Block a user