git: 1e2eea55c455 - main - nvme: Change fail_on_reset to bool
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Feb 2026 12:35:04 UTC
The branch main has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=1e2eea55c4559544b68c99e95641097983230611
commit 1e2eea55c4559544b68c99e95641097983230611
Author: Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-02-13 12:34:42 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-02-13 12:34:51 +0000
nvme: Change fail_on_reset to bool
This is safe since sysctl_handle_bool() handles ints transparently.
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55263
---
sys/dev/nvme/nvme_private.h | 2 +-
sys/dev/nvme/nvme_sysctl.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h
index 96ab5cc553e3..d06862ba5f4a 100644
--- a/sys/dev/nvme/nvme_private.h
+++ b/sys/dev/nvme/nvme_private.h
@@ -300,8 +300,8 @@ struct nvme_controller {
struct nvme_async_event_request aer[NVME_MAX_ASYNC_EVENTS];
uint32_t is_resetting;
- u_int fail_on_reset;
+ bool fail_on_reset;
bool is_failed;
bool is_failed_admin;
bool is_dying;
diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c
index 50d19e730a16..1b64ebddb9b2 100644
--- a/sys/dev/nvme/nvme_sysctl.c
+++ b/sys/dev/nvme/nvme_sysctl.c
@@ -425,7 +425,7 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *ctrlr)
CTLFLAG_RD, &ctrlr->cap_hi, 0,
"Hi 32-bits of capacities for the drive");
- SYSCTL_ADD_UINT(ctrlr_ctx, ctrlr_list, OID_AUTO, "fail_on_reset",
+ SYSCTL_ADD_BOOL(ctrlr_ctx, ctrlr_list, OID_AUTO, "fail_on_reset",
CTLFLAG_RD, &ctrlr->fail_on_reset, 0,
"Pretend the next reset fails and fail the controller");