Re: Invalid optimal transfer size 33553920 accepted when physical_block_size 512

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

 



On Sun, Mar 22, 2020 at 9:43 PM Martin K. Petersen
<martin.petersen@xxxxxxxxxx> wrote:
>
>
> Bernhard,
>
> > There does not seem to be a change in capaticy detected - you got a
> > almost complete section of dmesg from me. Anyway, here's the whole
> > thing after plugging in:
>
> OK, got a workaround. Will send tomorrow.
>

Hi Martin,

I might be able to help test this, as I have a USB drive enclosure
that is exhibiting the same kernel message of "Optimal transfer size
33553920 bytes not a multiple of physical block size (4096 bytes)".  I
noticed this as I was using the enclosure to random overwrite a batch
of old drives, and I started seeing that message in a terminal running
"journalctl -kf" after I had connected a couple of Advanced Format
(4096 byte physical, 512 byte logical) drives.

Here's an example of the USB enclosure with a 512e drive plugged in:

$ sudo sg_inq /dev/sdc
standard INQUIRY:
  PQual=0  Device_type=0  RMB=0  LU_CONG=0  version=0x06  [SPC-4]
  [AERC=0]  [TrmTsk=0]  NormACA=0  HiSUP=0  Resp_data_format=2
  SCCS=0  ACC=0  TPGS=0  3PC=0  Protect=0  [BQue=0]
  EncServ=0  MultiP=0  [MChngr=0]  [ACKREQQ=0]  Addr16=0
  [RelAdr=0]  WBus16=0  Sync=0  [Linked=0]  [TranDis=0]  CmdQue=1
  [SPI: Clocking=0x0  QAS=0  IUS=0]
    length=76 (0x4c)   Peripheral device type: disk
 Vendor identification: TOSHIBA
 Product identification: MK1059GSM
 Product revision level: 0
 Unit serial number: 1000000000CA

$ sudo sg_readcap -16 /dev/sdc
Read Capacity results:
   Protection: prot_en=0, p_type=0, p_i_exponent=0
   Logical block provisioning: lbpme=0, lbprz=0
   Last logical block address=1953525167 (0x74706daf), Number of
logical blocks=1953525168
   Logical block length=512 bytes
   Logical blocks per physical block exponent=3 [so physical block
length=4096 bytes]
   Lowest aligned logical block address=0
Hence:
   Device size: 1000204886016 bytes, 953869.7 MiB, 1000.20 GB
$ sudo sg_readcap -H -16 /dev/sdc
 00     00 00 00 00 74 70 6d af  00 00 02 00 00 03 00 00
 10     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00

$ sudo sg_vpd -p 0xb0 /dev/sdc
Block limits VPD page (SBC):
  Write same non-zero (WSNZ): 0
  Maximum compare and write length: 0 blocks
  Optimal transfer length granularity: 8 blocks
  Maximum transfer length: 65535 blocks
  Optimal transfer length: 65535 blocks
  Maximum prefetch length: 65535 blocks
  Maximum unmap LBA count: 0
  Maximum unmap block descriptor count: 0
  Optimal unmap granularity: 0
  Unmap granularity alignment valid: 0
  Unmap granularity alignment: 0
  Maximum write same length: 0x0 blocks
  Maximum atomic transfer length: 0
  Atomic alignment: 0
  Atomic transfer length granularity: 0
  Maximum atomic transfer length with atomic boundary: 0
  Maximum atomic boundary size: 0
$ sudo sg_vpd -H -p 0xb0 /dev/sdc
Block limits VPD page (SBC):
 00     00 b0 00 3c 00 00 00 08  00 00 ff ff 00 00 ff ff    ...<............
 10     00 00 ff ff 00 00 00 00  00 00 00 00 00 00 00 00    ................
 20     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
 30     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................

...and here's the same drive, plugged in directly to a Serial ATA port
on the mainboard:

$ sudo sg_inq /dev/sdb
standard INQUIRY:
  PQual=0  Device_type=0  RMB=0  LU_CONG=0  version=0x05  [SPC-3]
  [AERC=0]  [TrmTsk=0]  NormACA=0  HiSUP=0  Resp_data_format=2
  SCCS=0  ACC=0  TPGS=0  3PC=0  Protect=0  [BQue=0]
  EncServ=0  MultiP=0  [MChngr=0]  [ACKREQQ=0]  Addr16=0
  [RelAdr=0]  WBus16=0  Sync=0  [Linked=0]  [TranDis=0]  CmdQue=1
  [SPI: Clocking=0x0  QAS=0  IUS=0]
    length=96 (0x60)   Peripheral device type: disk
 Vendor identification: ATA
 Product identification: TOSHIBA MK1059GS
 Product revision level: 1U
 Unit serial number:            91GCPH6RT

$ sudo sg_readcap -16 /dev/sdb
Read Capacity results:
   Protection: prot_en=0, p_type=0, p_i_exponent=0
   Logical block provisioning: lbpme=0, lbprz=0
   Last logical block address=1953525167 (0x74706daf), Number of
logical blocks=1953525168
   Logical block length=512 bytes
   Logical blocks per physical block exponent=3 [so physical block
length=4096 bytes]
   Lowest aligned logical block address=0
Hence:
   Device size: 1000204886016 bytes, 953869.7 MiB, 1000.20 GB
$ sudo sg_readcap -H -16 /dev/sdb
 00     00 00 00 00 74 70 6d af  00 00 02 00 00 03 00 00
 10     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00

$ sudo sg_vpd -p 0xb0 /dev/sdb
Block limits VPD page (SBC):
  Write same non-zero (WSNZ): 0
  Maximum compare and write length: 0 blocks
  Optimal transfer length granularity: 8 blocks
  Maximum transfer length: 0 blocks
  Optimal transfer length: 0 blocks
  Maximum prefetch length: 0 blocks
  Maximum unmap LBA count: 0
  Maximum unmap block descriptor count: 0
  Optimal unmap granularity: 0
  Unmap granularity alignment valid: 0
  Unmap granularity alignment: 0
  Maximum write same length: 0x0 blocks
  Maximum atomic transfer length: 0
  Atomic alignment: 0
  Atomic transfer length granularity: 0
  Maximum atomic transfer length with atomic boundary: 0
  Maximum atomic boundary size: 0
$ sudo sg_vpd -H -p 0xb0 /dev/sdb
Block limits VPD page (SBC):
 00     00 b0 00 3c 00 00 00 08  00 00 00 00 00 00 00 00    ...<............
 10     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
 20     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
 30     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................


Thanks,

Bryan




[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