From owner-svn-src-all@freebsd.org Sat Jun 6 06:21:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7462C3282F1; Sat, 6 Jun 2020 06:21:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49f8Xr2SKSz42Lj; Sat, 6 Jun 2020 06:21:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FA591DC10; Sat, 6 Jun 2020 06:21:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0566LGr0037159; Sat, 6 Jun 2020 06:21:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0566LGxY037158; Sat, 6 Jun 2020 06:21:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202006060621.0566LGxY037158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 6 Jun 2020 06:21:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361866 - head/sys/cam/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/nvme X-SVN-Commit-Revision: 361866 X-SVN-Commit-Repository: base 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.33 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: Sat, 06 Jun 2020 06:21:16 -0000 Author: imp Date: Sat Jun 6 06:21:15 2020 New Revision: 361866 URL: https://svnweb.freebsd.org/changeset/base/361866 Log: Add a tunable for the nvd symlink creation. Some automation tries to detect if nvd or nda is in used, and the presence of both confuses it. Provide a knob to turn off nvd alias creation (kern.cam.nda.nvd_compat=0) for these situations. The default is the same: create the nvd compat link. Modified: head/sys/cam/nvme/nvme_da.c Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Sat Jun 6 06:20:04 2020 (r361865) +++ head/sys/cam/nvme/nvme_da.c Sat Jun 6 06:21:15 2020 (r361866) @@ -185,11 +185,14 @@ static int nda_send_ordered = NDA_DEFAULT_SEND_ORDERED static int nda_default_timeout = NDA_DEFAULT_TIMEOUT; static int nda_max_trim_entries = NDA_MAX_TRIM_ENTRIES; static int nda_enable_biospeedup = 1; +static int nda_nvd_compat = 1; SYSCTL_INT(_kern_cam_nda, OID_AUTO, max_trim, CTLFLAG_RDTUN, &nda_max_trim_entries, NDA_MAX_TRIM_ENTRIES, "Maximum number of BIO_DELETE to send down as a DSM TRIM."); SYSCTL_INT(_kern_cam_nda, OID_AUTO, enable_biospeedup, CTLFLAG_RDTUN, - &nda_enable_biospeedup, 0, "Enable BIO_SPEEDUP processing"); + &nda_enable_biospeedup, 0, "Enable BIO_SPEEDUP processing."); +SYSCTL_INT(_kern_cam_nda, OID_AUTO, nvd_compat, CTLFLAG_RDTUN, + &nda_nvd_compat, 1, "Enable creation of nvd aliases."); /* * All NVMe media is non-rotational, so all nvme device instances @@ -950,7 +953,8 @@ ndaregister(struct cam_periph *periph, void *arg) /* * Add alias for older nvd drives to ease transition. */ - disk_add_alias(disk, "nvd"); + if (nda_nvd_compat) + disk_add_alias(disk, "nvd"); /* * Acquire a reference to the periph before we register with GEOM.