From owner-svn-src-all@FreeBSD.ORG Thu Dec 18 08:45:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE318244; Thu, 18 Dec 2014 08:45:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B98081A46; Thu, 18 Dec 2014 08:45:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBI8jTN7030421; Thu, 18 Dec 2014 08:45:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBI8jThH030420; Thu, 18 Dec 2014 08:45:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201412180845.sBI8jThH030420@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 18 Dec 2014 08:45:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275894 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2014 08:45:29 -0000 Author: mav Date: Thu Dec 18 08:45:28 2014 New Revision: 275894 URL: https://svnweb.freebsd.org/changeset/base/275894 Log: MFC r275512: 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. Sponsored by: iXsystems, Inc. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Thu Dec 18 08:43:36 2014 (r275893) +++ stable/10/sys/cam/ctl/ctl.c Thu Dec 18 08:45:28 2014 (r275894) @@ -4349,8 +4349,7 @@ ctl_init_log_page_index(struct ctl_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) { @@ -10255,8 +10254,8 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * 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; @@ -14004,7 +14003,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];