Re: [PATCH] SCSI: SD: set max_ws_blocks as max_unmap_blocks if it isn't provided

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

 



On Fri, Dec 5, 2014 at 8:56 PM, Martin K. Petersen
<martin.petersen@xxxxxxxxxx> wrote:
>>>>>> "Ming" == Ming Lei <ming.lei@xxxxxxxxxxxxx> writes:
>
> Ming,
>
> Ming> QEMU SCSI device claims to support UNMAP, WRITE SAME and WRITE
> Ming> SAME 16 in LBP VPD page, but only provides "Maximum unmap LBA
> Ming> count" in block limits VPD page, and "Maximum write same length"
> Ming> isn't set.
>
> That really sounds like a problem that should be fixed in QEMU SCSI.

It can be fixed, but there are lots of old QEMU in production.

>
> Ming> The default max_discard_sectors(SD_MAX_WS16_BLOCKS) can't work at
> Ming> all since it is much bigger than the actual Maximum unmap LBA
> Ming> count.
>
> There is absolutely no correlation between max write same blocks and max
> unmap blocks. They are two entirely different commands. If QEMU SCSI

Do you have any better idea for the problem?

> advertises support for WRITE SAME(16) and does not report a cap in the
> block limits VPD then we must expect that it supports the maximum number
> of blocks that can be expressed by the command.

Unfortunately it doesn't support that, see below log:

[   50.112885] sd 0:0:1:0: [sda] FAILED Result: hostbyte=DID_OK
driverbyte=DRIVER_SENSE
[   50.113859] sd 0:0:1:0: [sda] Sense Key : Illegal Request [current]
[   50.113859] sd 0:0:1:0: [sda] Add. Sense: Invalid field in cdb
[   50.113859] sd 0:0:1:0: [sda] CDB:
[   50.113859] Write same(16): 93 08 00 00 00 00 00 00 80 00 00 40 00 00 00 00
[   50.113859] blk_update_request: critical target error, dev sda, sector
32768


Thanks,
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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