Patch "scsi: core: Introduce scsi_get_sector()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: core: Introduce scsi_get_sector()

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-core-introduce-scsi_get_sector.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 41ce719a5d781bdb43352d9bb2639f134a58709d
Author: Bart Van Assche <bvanassche@xxxxxxx>
Date:   Tue Jun 8 23:39:24 2021 -0400

    scsi: core: Introduce scsi_get_sector()
    
    [ Upstream commit f0f214fe8cd32224267ebea93817b8c32074623d ]
    
    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
    Link: https://lore.kernel.org/r/20210609033929.3815-11-martin.petersen@xxxxxxxxxx
    Cc: Christoph Hellwig <hch@xxxxxx>
    Cc: Ming Lei <ming.lei@xxxxxxxxxx>
    Cc: Hannes Reinecke <hare@xxxxxxx>
    Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxx>
    Reviewed-by: Benjamin Block <bblock@xxxxxxxxxxxxx>
    Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Message-Id: <20210609033929.3815-11-martin.petersen@xxxxxxxxxx>
    Stable-dep-of: 066c5b46b6ea ("scsi: core: Always send batch on reset or error handling command")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 6630464635330..ddab0c580382b 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -224,6 +224,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);
+}
+
 /*
  * The operations below are hints that tell the controller driver how
  * to handle I/Os with DIF or similar types of protection information.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux