Bug 90761
Summary: | USB stick show as rotational disk | ||
---|---|---|---|
Product: | Drivers | Reporter: | chepioq (chepioq) |
Component: | Flash/Memory Technology Devices | Assignee: | David Woodhouse (dwmw2) |
Status: | NEW --- | ||
Severity: | normal | CC: | chepioq, madko77, marcos.souza.org |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.17.7-300.fc21.x86_64 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
chepioq
2015-01-04 09:08:28 UTC
Anybody here ? I can reproduce the behavior in a recent kernel: cat /sys/block/sdc/queue/rotational 1 cat /sys/block/sdc/device/model Cruzer Blade Looking at the kernel code related SCSI (created by usb-storage module), it first unsets the NONROT flag (leaving it as rotational)[1], letting to be checked by vpd[2]. In my test, my usb storage devices does not have bdc (Block Device Characteristics): sudo /usr/bin/sg_vpd --page 0x0 /dev/sdc [sudo] password for root: Supported VPD pages VPD page: Supported VPD pages [sv] Unit serial number [sn] Device identification [di] For example, take a look of the info reported when checking a SSD device which have VPD BDC support: sudo /usr/bin/sg_vpd --page 0x0 /dev/sda Supported VPD pages VPD page: Supported VPD pages [sv] Unit serial number [sn] Device identification [di] ATA information (SAT) [ai] Block limits (SBC) [bl] Block device characteristics (SBC) [bdc] <---- bdc support Logical block provisioning (SBC) [lbpv] sudo /usr/bin/sg_vpd --page 0xb1 /dev/sda Block device characteristics VPD page (SBC): Non-rotating medium (e.g. solid state) <---- Non rotating... Product type: Not specified WABEREQ=0 WACEREQ=0 Nominal form factor not reported ZONED=0 RBWZ=0 BOCS=0 FUAB=0 VBULS=0 DEPOPULATION_TIME=0 (seconds) I will check SCSI specialists if this can be clarified at code level. [1]: https://github.com/torvalds/linux/blob/master/drivers/scsi/sd.c#L3123 [2]: https://github.com/torvalds/linux/blob/master/drivers/scsi/sd.c#L2931 Currently, there is no way to distinguish if an USB that don't have VPD is a flash disk, because VPD BDC is used. USB sticks that have VPD BDC should be set as not rotational as expected. So it's a known issue, but so far there is no way to fix it. |