Add new compile-time option NVME_USE_NVD that sets the default value

of the runtime hw.nvme.use_vnd tunable. We still default to nvd unless
otherwise requested.

Sponsored by: Netflix
This commit is contained in:
Warner Losh 2017-08-28 23:54:25 +00:00
parent c02565f9fa
commit 850564b948
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=322995
2 changed files with 10 additions and 1 deletions

View File

@ -998,3 +998,6 @@ HN_DEBUG opt_hn.h
MMCCAM
# Encrypted kernel crash dumps
EKCD opt_ekcd.h
# NVME options
NVME_USE_NVD opt_nvme.h

View File

@ -27,13 +27,19 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_nvme.h"
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/sysctl.h>
#include "nvme_private.h"
int nvme_use_nvd = 1;
#ifndef NVME_USE_NVD
#define NVME_USE_NVD 1
#endif
int nvme_use_nvd = NVME_USE_NVD;
SYSCTL_NODE(_hw, OID_AUTO, nvme, CTLFLAG_RD, 0, "NVMe sysctl tunables");
SYSCTL_INT(_hw_nvme, OID_AUTO, use_nvd, CTLFLAG_RDTUN,