git: fe52c3384c61 - main - nvme_sim: Add comment about the is_failed test
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 07 Mar 2024 19:05:52 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fe52c3384c61a092a305deebc063968a47dc854f commit fe52c3384c61a092a305deebc063968a47dc854f Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-03-06 21:30:01 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-03-07 19:05:28 +0000 nvme_sim: Add comment about the is_failed test We only see a request with a failed controller while we're in the process of failing the controller. Add a comment to that effect. Sponsored by: Netflix --- sys/dev/nvme/nvme_sim.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c index 70bb95602bf8..f561756f99b7 100644 --- a/sys/dev/nvme/nvme_sim.c +++ b/sys/dev/nvme/nvme_sim.c @@ -270,6 +270,10 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb) case XPT_NVME_IO: /* Execute the requested I/O operation */ case XPT_NVME_ADMIN: /* or Admin operation */ if (ctrlr->is_failed) { + /* + * I/O came in while we were failing the drive, so drop + * it. Once falure is complete, we'll be destroyed. + */ ccb->ccb_h.status = CAM_DEV_NOT_THERE; break; }