[PATCH nvme-cli] nvme: check MUD support before firmware commit
Tokunori Ikegami
ikegami.t at gmail.com
Tue May 19 15:50:27 PDT 2026
On 2026/05/19 22:45, guzebing wrote:
> From: Guzebing <guzebing at bytedance.com>
>
> Firmware Commit returns the Multiple Update Detected value in the command
> completion. nvme-cli currently identifies the controller after the
> command completes to decide whether to print that value.
>
> That post-command Identify is fragile for immediate activation. A possible
> Linux race looks like:
>
> nvme-cli thread nvme driver AEN work
> --------------- --------------------
> libnvme_exec_admin_passthru()
> -> Firmware Commit succeeds
> nvme_handle_aen_notice()
> -> FW_ACT_STARTING
> -> nvme_change_ctrl_state(RESETTING)
> -> nvme_fw_act_work()
> -> nvme_quiesce_io_queues()
> -> wait for activation
> fw_commit_print_mud()
> -> fw_commit_support_mud()
> -> nvme_identify_ctrl()
> -> admin ioctl passthru
> -> nvme_user_cmd*()
> -> blk_mq_alloc_request()
> -> __nvme_check_ready()
> rejects user admin command while resetting
>
> nvme-cli then prints "identify-ctrl: ..." after the successful
> fw-commit output. The extra error makes it unclear whether Firmware
> Commit itself failed, even though the command completion was already
> successful.
Seems the changes good but to make sure let me confirm below if possible.
1. Is this failure really caused?
2. Is there any log or issue report information?
3. Not necessary to care the case as the old firmware not supported
MUD but only the new firmware supported MUD? (I think so but let me
double check.)
More information about the Linux-nvme
mailing list