svn commit: r330953 - head/sys/dev/nvme

Warner Losh imp at FreeBSD.org
Wed Mar 14 23:01:05 UTC 2018


Author: imp
Date: Wed Mar 14 23:01:04 2018
New Revision: 330953
URL: https://svnweb.freebsd.org/changeset/base/330953

Log:
  Don't make the namespace devices eternal.
  
  We'll need to delete namespaces soon, so go ahead and stop making
  these devices eternal. It doesn't help much, and will be getting in
  the way soon.
  
  Sponsored by: Netflix

Modified:
  head/sys/dev/nvme/nvme_ns.c

Modified: head/sys/dev/nvme/nvme_ns.c
==============================================================================
--- head/sys/dev/nvme/nvme_ns.c	Wed Mar 14 22:11:45 2018	(r330952)
+++ head/sys/dev/nvme/nvme_ns.c	Wed Mar 14 23:01:04 2018	(r330953)
@@ -577,21 +577,9 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t 
 	 */
 	unit = device_get_unit(ctrlr->dev) * NVME_MAX_NAMESPACES + ns->id - 1;
 
-/*
- * MAKEDEV_ETERNAL was added in r210923, for cdevs that will never
- *  be destroyed.  This avoids refcounting on the cdev object.
- *  That should be OK case here, as long as we're not supporting PCIe
- *  surprise removal nor namespace deletion.
- */
-#ifdef MAKEDEV_ETERNAL_KLD
-	ns->cdev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &nvme_ns_cdevsw, unit,
-	    NULL, UID_ROOT, GID_WHEEL, 0600, "nvme%dns%d",
-	    device_get_unit(ctrlr->dev), ns->id);
-#else
 	ns->cdev = make_dev_credf(0, &nvme_ns_cdevsw, unit,
 	    NULL, UID_ROOT, GID_WHEEL, 0600, "nvme%dns%d",
 	    device_get_unit(ctrlr->dev), ns->id);
-#endif
 #ifdef NVME_UNMAPPED_BIO_SUPPORT
 	ns->cdev->si_flags |= SI_UNMAPPED;
 #endif


More information about the svn-src-head mailing list