Re: [PATCH RFC 2/2] block: Enforce power-of-2 physical block size

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

 



Bart,

> I think this means that the SCSI standards support physical blocks
> that are smaller than the logical block size.

It's just boilerplate weasel wording to avoid breaking the seal of
compliance for any devices that may have done something like this in the
past.

> However, as far as I know the Linux kernel does not try to determine
> the physical block size in this case. As one can see in
> drivers/scsi/sd.c LBPPBE == 0 is treated as one physical block per
> logical block:
>
> 	/* Logical blocks per physical block exponent */
> 	sdkp->physical_block_size = (1 << (buffer[13] & 0xf)) * sector_size;

Yep. It's the only sensible choice. There is no way for the device to
report a physical block size smaller than the logical block size. Also,
there is no way for us to send a read or a write operation to a block
smaller than the reported logical block size.

-- 
Martin K. Petersen




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux