mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-02 12:20:51 +00:00
Add LU option to control reported provisioning type.
MFC after: 2 weeks
This commit is contained in:
parent
db1fcc8008
commit
4928a0c224
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=307374
@ -10040,6 +10040,7 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio *ctsio, int alloc_len)
|
||||
{
|
||||
struct scsi_vpd_logical_block_prov *lbp_ptr;
|
||||
struct ctl_lun *lun;
|
||||
const char *value;
|
||||
|
||||
lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
|
||||
|
||||
@ -10077,7 +10078,14 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio *ctsio, int alloc_len)
|
||||
if (lun != NULL && lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) {
|
||||
lbp_ptr->flags = SVPD_LBP_UNMAP | SVPD_LBP_WS16 |
|
||||
SVPD_LBP_WS10 | SVPD_LBP_RZ | SVPD_LBP_ANC_SUP;
|
||||
lbp_ptr->prov_type = SVPD_LBP_THIN;
|
||||
value = ctl_get_opt(&lun->be_lun->options, "provisioning_type");
|
||||
if (value != NULL) {
|
||||
if (strcmp(value, "resource") == 0)
|
||||
lbp_ptr->prov_type = SVPD_LBP_RESOURCE;
|
||||
else if (strcmp(value, "thin") == 0)
|
||||
lbp_ptr->prov_type = SVPD_LBP_THIN;
|
||||
} else
|
||||
lbp_ptr->prov_type = SVPD_LBP_THIN;
|
||||
}
|
||||
|
||||
ctl_set_success(ctsio);
|
||||
|
@ -903,8 +903,14 @@ Specifies medium rotation rate of the device: 0 -- not reported,
|
||||
.It Va formfactor
|
||||
Specifies nominal form factor of the device: 0 -- not reported, 1 -- 5.25",
|
||||
2 -- 3.5", 3 -- 2.5", 4 -- 1.8", 5 -- less then 1.8".
|
||||
.It Va provisioning_type
|
||||
When UNMAP support is enabled, this option specifies provisioning type:
|
||||
"resource", "thin" or "unknown".
|
||||
Default value is "thin".
|
||||
Logical units without UNMAP support are reported as fully provisioned.
|
||||
.It Va unmap
|
||||
Set to "on", enables UNMAP support for the LUN, if supported by the backend.
|
||||
Setting to "on" or "off" controls UNMAP support for the logical unit.
|
||||
Default value is "on" if supported by the backend.
|
||||
.It Va unmap_max_lba
|
||||
.It Va unmap_max_descr
|
||||
Specify maximum allowed number of LBAs and block descriptors per UNMAP
|
||||
|
Loading…
Reference in New Issue
Block a user