scsi: ufs: show lba and length for unmap commands
PATCH 1/1 scsi: ufs: show lba and length for unmap commands
From: Leo Liou <[email protected]>
We have lba and length for unmap commands.
--- drivers/scsi/ufs/ufshcd.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/scsi/ufs/ufshcd.c +5 -0
@@ -376,6 +376,11 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, lrbp->ucd_req_ptr->sc.exp_data_transfer_len);if (opcode ==WRITE_10 ) group_id = lrbp->cmd->cmnd[6 ]; + }else if (opcode ==UNMAP ) { +if (cmd->request) { + lba =scsi_get_lba (cmd); + transfer_len =blk_rq_bytes (cmd->request); + } } }
Signature · 1 line
2.29.2.299.gdc1121823c-goog
Hi,
Quoted 14 lines · Jaegeuk Kim
From: Leo Liou <[email protected]>
We have lba and length for unmap commands.
Signed-off-by Leo Liou <[email protected]>--- drivers/scsi/ufs/ufshcd.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/scsi/ufs/ufshcd.c +0
-0
drivers/scsi/ufs/ufshcd.c static void ufshcd_add_command_trace(struct ufs_hba *hba, · line 383
Quoted 8 lines
drivers/scsi/ufs/ufshcd.c +5
-0@@ -376,6 +376,11 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, lrbp->ucd_req_ptr->sc.exp_data_transfer_len);if (opcode ==WRITE_10 ) group_id = lrbp->cmd->cmnd[6 ]; + }else if (opcode ==UNMAP ) { +if (cmd->request) { + lba =scsi_get_lba (cmd); + transfer_len =blk_rq_bytes (cmd->request); + }
Nitpicking: Perhaps we could unify the method of obtaining both lba and transfer_len for all READ/WRITE/UNMAP commands?
Quoted 3 lines
drivers/scsi/ufs/ufshcd.c +0
-0} }
Hi Jaegeuk!
Quoted 5 lines
From: Leo Liou <[email protected]>
We have lba and length for unmap commands.
Signed-off-by Leo Liou <[email protected]>
Doesn't apply to 5.11/scsi-queue.
Also needs a Signed-off-by: tag from you.
Thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Quoted 5 lines · Martin K. Petersen
Hi Jaegeuk!
Quoted 2 lines
From: Leo Liou <[email protected]>
Quoted 7 lines
Quoted 3 lines
We have lba and length for unmap commands.
Signed-off-by Leo Liou <[email protected]>Doesn't apply to 5.11/scsi-queue.
Also needs a Signed-off-by: tag from you.
Hi Martin,
Could you please consider this patch series?
https://lore.kernel.org/linux-scsi/[email protected]/
Thanks,
Quoted 5 lines
Thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering