sg: Avoid READ CAPACITY failures
authorDmitry Fomichev <dmitry.fomichev@wdc.com>
Thu, 21 Feb 2019 04:11:00 +0000 (13:11 +0900)
committerJens Axboe <axboe@kernel.dk>
Sun, 24 Feb 2019 04:19:01 +0000 (21:19 -0700)
commit02ae7bd8339435c982f134ca63ee9062c1d92b8e
tree5011a99538d0c0864147d69fd5608495a8cd7048
parent63e3e40d47e1f318aa4d770d74a7b14d64867e1d
sg: Avoid READ CAPACITY failures

Some SCSI devices (very large disks or SMR zoned disks in particular)
do not support the READ CAPACITY(10) command and only reply
successfully to the READ CAPACITY(16) command. This patch forces the
execution READ CAPACITY(16) if READ CAPACITY(10) fails with
CHECK CONDITION.

Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/sg.c