Re: [PATCH v2 0/7] Rename scsi_get_lba() into scsi_get_pos()

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

 



On Wed, 2021-05-12 at 15:20 -0700, Bart Van Assche wrote:
> On 5/12/21 3:10 PM, James Bottomley wrote:
> > On Wed, 2021-05-12 at 13:08 -0700, Bart Van Assche wrote:
> > > This patch series renames scsi_get_lba() into scsi_get_pos(). The
> > > name of scsi_get_lba() is confusing since it does not return an
> > > LBA but instead the start offset divided by 512.
> > 
> > OK, I'll bite: given the logical block size for all drives is 512
> > why is logical block address not the start offset in bytes divided
> > by 512?
> 
> My understanding is that LBA = logical block address = (start offset
> in  bytes) / (logical block size) and also that the Linux kernel
> supports  logical block sizes between 512 bytes and 4 KiB.

No, we support physical sector sizes up to 4k.  The logical block size
internal to the kernel and the block layer is always 512.  I can see
the utility in using consistent naming to the block layer, but I can't
see that logical block address is confusing ... especially now
manufacturers seem all to have aligned on 512 for the logical block
size even when it's usually 4k physical.

James





[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