Re: [PATCH v3 1/8] core: Introduce scsi_get_sector()

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

 



On 5/13/21 11:20 PM, Christoph Hellwig wrote:
> On Thu, May 13, 2021 at 03:37:50PM -0700, Bart Van Assche wrote:
>> 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(). A later patch will remove scsi_get_lba().
> 
> Why not just do a quick rename in a single patch instead of the hard to
> review series?

Hi Christoph,

Something I noticed in the past is that driver maintainers refuse to add
their Reviewed-by: or Acked-by: if a patch modifies code outside the
driver they maintain. Another reason I split this patch series is that I
really want driver maintainers to take a look. My understanding of
section "4.19 Protection Information" in SBC-4 is that the LOGICAL BLOCK
REFERENCE TAG field should contain the least significant four bytes of
the LBA. However, in multiple SCSI LLDs I found code similar to the
following:

	ref_tag = cpu_to_le32(lower_32_bits(scsi_get_lba(cmd)))

or in other words, the starting offset divided by 512 is assigned to the
reference tag instead of the starting offset divided by the logical
block size. I think that's a bug.

Thanks,

Bart.



[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