In addition to r275481 allow threshold notifications work without UNMAP.

While without UNMAP support there is not much initiator can do about it,
the administrator still better be notified about the storage overflow.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
This commit is contained in:
mav 2014-12-05 13:30:45 +00:00
parent 6e4144dd5e
commit 04a19682d2

View File

@ -4347,8 +4347,7 @@ ctl_init_log_page_index(struct ctl_lun *lun)
continue;
if (page_index->page_code == SLS_LOGICAL_BLOCK_PROVISIONING &&
((lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) == 0 ||
lun->backend->lun_attr == NULL))
lun->backend->lun_attr == NULL)
continue;
if (page_index->page_code != prev) {
@ -10253,8 +10252,8 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio *ctsio, int alloc_len)
lbp_ptr->page_code = SVPD_LBP;
scsi_ulto2b(sizeof(*lbp_ptr) - 4, lbp_ptr->page_length);
lbp_ptr->threshold_exponent = CTL_LBP_EXPONENT;
if (lun != NULL && lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) {
lbp_ptr->threshold_exponent = CTL_LBP_EXPONENT;
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;
@ -14002,7 +14001,6 @@ ctl_thresh_thread(void *arg)
be_lun = lun->be_lun;
if ((lun->flags & CTL_LUN_DISABLED) ||
(lun->flags & CTL_LUN_OFFLINE) ||
(be_lun->flags & CTL_LUN_FLAG_UNMAP) == 0 ||
lun->backend->lun_attr == NULL)
continue;
rwpage = &lun->mode_pages.rw_er_page[CTL_PAGE_CURRENT];