[PATCH 1/2] nvme-core: add ctrl state transition debug helper
Sagi Grimberg
sagi at grimberg.me
Thu Mar 7 00:03:35 PST 2024
On 05/03/2024 18:34, Keith Busch wrote:
> On Sun, Feb 11, 2024 at 08:26:40PM -0800, Chaitanya Kulkarni wrote:
>> @@ -621,6 +636,9 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
>> }
>>
>> if (changed) {
>> + dev_dbg(ctrl->device, "%s %s -> %s\n", __func__,
>> + nvme_ctrl_state_str(old_state),
>> + nvme_ctrl_state_str(new_state));
>> WRITE_ONCE(ctrl->state, new_state);
>> wake_up_all(&ctrl->state_wq);
>> }
> Turing the system logs up to debug level might get you a whole lot of
> unrelated stuff. Could a new trace_event get you what you need instead?
> There's more fine grain control on those.
>
I actually think its useful here as is, dynamic debug can also turn on
debug per function.
More information about the Linux-nvme
mailing list