Invalid optimal transfer size 33553920 accepted when physical_block_size 512

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

 



According to the gparted forum (http://gparted-forum.surf4.info/viewtopic.php?id=17839) a couple sata-usb adapters seem to report an invalid optimal transfer size of 33553920 (which is 0xFFFF * 512).

This should have been fixed in a83da8a4509d about a year ago by in sd_validate_opt_xfer_size by checking whether the optimal transfer size opt_xfer_bytes is a multiple of physical_block_size. This works when physical block size is 4096, unfortunately it does not when the physical block size is 512 (which it is in my case). Related commit: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.1&id=a83da8a4509d3ebfe03bb7fffce022e4d5d4764f

This is pretty curious in itself, because lsblk reports 4096 physical sector size / 512 logical sector size and I would have thought physical sector size and physical block size should be the same. Is this a bug that should be reported?

Anyway, maybe 33553920 should always be marked as invalid?


Equipment used:
    # uname -srv
    Linux 5.6.0-rc6-1-git-00137-gb74b991fb8b9 #1 SMP PREEMPT Sat Mar 21 22:13:06 CET 2020

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

    # lsblk /dev/sdc -o +KNAME,HCTL,VENDOR,MODEL,SERIAL,REV
    NAME MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT KNAME HCTL VENDOR   MODEL          SERIAL    REV     sdc    8:32   0  7.3T  0 disk            sdc   6:0:0:0 Seagate  Backup+_Hub_BK NA9Q19AM D781

    # cat /proc/scsi/scsi
    Attached devices:
    [...]
    Host: scsi6 Channel: 00 Id: 00 Lun: 00
      Vendor: Seagate  Model: Backup+ Hub BK   Rev: D781
      Type:   Direct-Access                    ANSI  SCSI revision: 06

    # sudo lsusb -tvvv
    /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
        ID 1d6b:0003 Linux Foundation 3.0 root hub
        /sys/bus/usb/devices/usb4  /dev/bus/usb/004/001
        |__ Port 2: Dev 6, If 0, Class=Hub, Driver=hub/3p, 5000M
            ID 0bc2:ab45 Seagate RSS LLC
            /sys/bus/usb/devices/4-2  /dev/bus/usb/004/006
            |__ Port 1: Dev 7, If 0, Class=Mass Storage, Driver=uas, 5000M
                ID 0bc2:ab38 Seagate RSS LLC Backup Plus Hub
                /sys/bus/usb/
    [...]


Thanks, and please be easy on me




[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