Re: [PATCH 06/15] scsi: zfcp: Use the proper SCSI midlayer interfaces for PI

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

 



Hey Martin,

please set me and Steffen on CC next time for zfcp.

On Tue, Jun 08, 2021 at 11:39:20PM -0400, Martin K. Petersen wrote:
> Use scsi_prot_ref_tag() and scsi_prot_interval() instead
> scsi_get_lba() and sector_size.
> 
> Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
> ---
>  drivers/s390/scsi/zfcp_fsf.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
> index 2e4804ef2fb9..1990216cf289 100644
> --- a/drivers/s390/scsi/zfcp_fsf.c
> +++ b/drivers/s390/scsi/zfcp_fsf.c
> @@ -2599,8 +2599,8 @@ int zfcp_fsf_fcp_cmnd(struct scsi_cmnd *scsi_cmnd)
>  	io->fcp_cmnd_length = FCP_CMND_LEN;
>  
>  	if (scsi_get_prot_op(scsi_cmnd) != SCSI_PROT_NORMAL) {
> -		io->data_block_length = scsi_cmnd->device->sector_size;
> -		io->ref_tag_value = scsi_get_lba(scsi_cmnd) & 0xFFFFFFFF;
> +		io->data_block_length = scsi_prot_interval(scsi_cmnd);
> +		io->ref_tag_value = scsi_prot_ref_tag(scsi_cmnd);

Reviewed-by: Benjamin Block <bblock@xxxxxxxxxxxxx>


Out of curiosity, do you have any idea whether there is any storage that
offers DIF with a different Logical Block Size than 512 (I haven't see
any, although, that doesn't say much)? Just re-read some parts of our
HBA specs and we probably would be in trouble, if it does, with how we do
things here.

-- 
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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux