git: bdc81eeda05d - main - nvme: Switch to nda by default

From: Warner Losh <imp_at_FreeBSD.org>
Date: Tue, 13 Jun 2023 03:43:21 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=bdc81eeda05d3af80254f6aac95759b07f13f2b7

commit bdc81eeda05d3af80254f6aac95759b07f13f2b7
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-06-13 03:37:10 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-06-13 03:41:06 +0000

    nvme: Switch to nda by default
    
    We already run nda by default on all the !x86 architectures. Switch the
    default to nda. nda created nvd compatibility links by default, so this
    should be a nop. If this causes problems for your application, set
    hw.nvme.use_nvd=1 in your loader.conf.
    
    Sponsored by:           Netflix
---
 UPDATING                   | 8 ++++++++
 sys/dev/nvme/nvme_sysctl.c | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/UPDATING b/UPDATING
index caad098c683d..c75de2d66338 100644
--- a/UPDATING
+++ b/UPDATING
@@ -27,6 +27,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW:
 	world, or to merely disable the most expensive debugging functionality
 	at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20230612:
+	Belatedly switch the default nvme block device on x86 from nvd to nda.
+	nda created nvd compatibility links by default, so this should be a
+	nop. If this causes problems for your application, set hw.nvme.use_nvd=1
+	in your loader.conf or add `options NVME_USE_NVD=1` to your kernel
+	config. The default has been nda on all non-x86 platforms for some time
+	now. If you need to fall back, please email imp@freebsd.org about why.
+
 20230422:
 	Remove portsnap(8).  Users are encouraged to obtain the ports tree
 	using git instead.
diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c
index d6011bc34951..c238c86af5a2 100644
--- a/sys/dev/nvme/nvme_sysctl.c
+++ b/sys/dev/nvme/nvme_sysctl.c
@@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
 #include "nvme_private.h"
 
 #ifndef NVME_USE_NVD
-#define NVME_USE_NVD 1
+#define NVME_USE_NVD 0
 #endif
 
 int nvme_use_nvd = NVME_USE_NVD;