[PATCH 3/3] nvme: parse format command's lbafu when tracing
Guixin Liu
kanie at linux.alibaba.com
Mon Jan 29 19:37:55 PST 2024
在 2024/1/29 19:01, Chaitanya Kulkarni 写道:
> On 1/29/24 00:22, Guixin Liu wrote:
>> Add the parse of format command's lbafu to calculate lbaf.
>>
>> Signed-off-by: Guixin Liu <kanie at linux.alibaba.com>
>> ---
>> drivers/nvme/host/trace.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/nvme/host/trace.c b/drivers/nvme/host/trace.c
>> index b383d51c1a0c..3ccb33646794 100644
>> --- a/drivers/nvme/host/trace.c
>> +++ b/drivers/nvme/host/trace.c
>> @@ -119,7 +119,9 @@ static const char *nvme_trace_get_lba_status(struct trace_seq *p,
>> static const char *nvme_trace_admin_format_nvm(struct trace_seq *p, u8 *cdw10)
>> {
>> const char *ret = trace_seq_buffer_ptr(p);
>> - u8 lbaf = cdw10[0] & 0xF;
>> + u8 lbafl = cdw10[0] & 0xF;
>> + u8 lbafu = (cdw10[1] >> 4) & 0x3;
>> + u8 lbaf = (lbafu << 4) | lbafl;
>> u8 mset = (cdw10[0] >> 4) & 0x1;
>> u8 pi = (cdw10[0] >> 5) & 0x7;
>> u8 pil = cdw10[1] & 0x1;
> as I don't see the newly added variables used in printing a trace do we
> really need
> the calculation or a meaningful comment is would work ?
>
> -ck
OK, I will delete lbafl and lbafu variables, and add a comment for lbaf.
>
>
More information about the Linux-nvme
mailing list