Re: Invalid optimal transfer size 33553920 accepted when physical_block_size 512

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

 




And I am guessing your device does not trigger a Unit Attention as a
result. You don't see something like "Inquiry data has changed" or
"Capacity data has changed" in the log, do you?
I have been working on a set of patches that will address devices like
this that change their tune halfway through discovery. Your case is
really just the tip of the iceberg, more changes are needed to handle
this gracefully.

I'll try to get these changes completed in time for 5.7. However, we
need a smaller fix for 5.6 and stable. Can you please try the patch I
just sent?

Thanks!

The patch seems to work great.

# dmesg -wH

[  +0.005956] scsi host6: uas
[  +0.000153] usbcore: registered new interface driver uas
[  +0.000392] scsi 6:0:0:0: Direct-Access     Seagate  Backup+ Hub BK   D781 PQ: 0 ANSI: 6
[  +0.000577] sd 6:0:0:0: Attached scsi generic sg3 type 0
[  +0.000199] sd 6:0:0:0: [sdc] Spinning up disk...
[  +0.059686] usb 2-2-port2: Cannot enable. Maybe the USB cable is bad?
[  +0.957465] .............ready
[ +12.207661] sd 6:0:0:0: [sdc] sd_read_capacity: rc10_first 0, rc16_first: 1
[  +0.000108] sd 6:0:0:0: [sdc] read_capacity_16: result 0, retries 2
[  +0.000005] sd 6:0:0:0: [sdc] read_capacity_16: lbs 512, pbs 512, last LBA 3a3812aae [  +0.000278] sd 6:0:0:0: [sdc] 15628053167 512-byte logical blocks: (8.00 TB/7.28 TiB)
[  +0.031496] sd 6:0:0:0: [sdc] Write Protect is off
[  +0.000014] sd 6:0:0:0: [sdc] Mode Sense: 4f 00 00 00
[  +0.000160] sd 6:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[  +0.000200] sd 6:0:0:0: [sdc] Preferred minimum I/O size 512 bytes
[  +0.000003] sd 6:0:0:0: [sdc] Optimal transfer size 33553920 bytes
[  +0.020620] sd 6:0:0:0: [sdc] sd_read_capacity: rc10_first 0, rc16_first: 1
[  +0.000075] sd 6:0:0:0: [sdc] read_capacity_16: result 0, retries 2
[  +0.000003] sd 6:0:0:0: [sdc] read_capacity_16: lbs 512, pbs 4096, last LBA 3a3812aae [  +0.021509] sd 6:0:0:0: [sdc] sd_read_capacity: rc10_first 0, rc16_first: 1
[  +0.000077] sd 6:0:0:0: [sdc] read_capacity_16: result 0, retries 2
[  +0.000003] sd 6:0:0:0: [sdc] read_capacity_16: lbs 512, pbs 4096, last LBA 3a3812aae
[  +0.000595] sd 6:0:0:0: [sdc] Attached SCSI disk

dmesg does not seem too different, but lsblk's reporting is now correct:

# lsblk -t /dev/sdc
NAME ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED RQ-SIZE  RA WSAME
sdc          0   4096      0    4096     512    1 mq-deadline 60 128   32M


As you can see I have left the other two patches in too, not sure if I was supposed to do that.

Thank you so much. Any chance any of this could be backported?




[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