[PATCH v6 01/18] nvmet: Rapid Path Failure Recovery set controller identify fields
Daniel Wagner
dwagner at suse.de
Thu Oct 15 05:58:04 PDT 2026
> maximum number of in-progress controller reset operations. CCRL is
> hardcoded to 4 as recommended by TP8028.
The spec says at least 4.
> @@ -1695,6 +1699,11 @@ struct nvmet_ctrl *nvmet_alloc_ctrl(struct nvmet_alloc_ctrl_args *args)
> }
> ctrl->cntlid = ret;
>
> + if (!nvmet_is_disc_subsys(ctrl->subsys)) {
> + ctrl->ciu = get_random_u8() ? : 1;
> + ctrl->cirn = get_random_u64();
While get_random_u64 is very unlikely to return 0, it still possible, thus
get_random_u64() ? : 1;
would be the safe choice. Besides this nitpicking:
Reviewed-by: Daniel Wagner <dwagner at suse.de>
--
Daniel Wagner <wagi at kernel.org>
More information about the Linux-nvme
mailing list