On 2021/05/14 7:38, Bart Van Assche wrote: > Use scsi_get_sector() instead of scsi_get_lba() since the name of the > latter is confusing. Use scsi_get_sector() for all SCSI requests since all > SCSI requests have a block layer request attached and hence calling > scsi_get_sector() is allowed. Convert the scsi_get_sector() result > from sector_t into an LBA with sectors_to_logical(). Since READ(10), > WRITE(10), READ(16) and WRITE(16) all have a GROUP NUMBER field, extract > the GROUP NUMBER field for all four SCSI commands. Apply the 0x3f mask to > that field since the upper two bits are reserved. Rename the 'transfer_len' > variable into 'affected_bytes' since it represents the number of bytes > affected on the storage medium instead of the size of the SCSI data buffer. Looks good. Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxx> -- Damien Le Moal Western Digital Research