On Tue, Jun 08, 2021 at 11:39:24PM -0400, Martin K. Petersen wrote: > From: Bart Van Assche <bvanassche@xxxxxxx> > > Since scsi_get_lba() returns a sector_t value instead of the LBA, the name > of that function is confusing. Introduce an identical function > scsi_get_sector(). > > Link: https://lore.kernel.org/r/20210513223757.3938-2-bvanassche@xxxxxxx > Cc: Christoph Hellwig <hch@xxxxxx> > Cc: Ming Lei <ming.lei@xxxxxxxxxx> > Cc: Hannes Reinecke <hare@xxxxxxx> > Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxx> > Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> > Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx> > --- > include/scsi/scsi_cmnd.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h > index 301b9cd4ddd0..cba63377d46a 100644 > --- a/include/scsi/scsi_cmnd.h > +++ b/include/scsi/scsi_cmnd.h > @@ -220,6 +220,11 @@ static inline int scsi_sg_copy_to_buffer(struct scsi_cmnd *cmd, > buf, buflen); > } > > +static inline sector_t scsi_get_sector(struct scsi_cmnd *scmd) > +{ > + return blk_rq_pos(scmd->request); Wondering a bit why this still uses the request pointer, after you say in patch 01 that it goes away. So it should probably use `blk_mq_rq_from_pdu()`? -- Best Regards, Benjamin Block / Linux on IBM Z Kernel Development / IBM Systems IBM Deutschland Research & Development GmbH / https://www.ibm.com/privacy Vorsitz. AufsR.: Gregor Pillen / Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: AmtsG Stuttgart, HRB 243294