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

2014-12-30 Thread Christoph Hellwig
Thanks, applied to scsi-for-3.19. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2014-12-05 Thread Ming Lei
The commit 7985090aa0201(sd: Disable discard_zeroes_data for UNMAP) introduces regresion for QEMU SCSI. QEMU SCSI device claims to support UNMAP, WRITE SAME and WRITE SAME 16 in LBP VPD page, but only provides Maximum unmap LBA count in block limits VPD page, and Maximum write same length isn't

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

2014-12-05 Thread Ming Lei
On Fri, Dec 5, 2014 at 8:56 PM, Martin K. Petersen martin.peter...@oracle.com wrote: Ming == Ming Lei ming@canonical.com 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

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

2014-12-05 Thread Martin K. Petersen
Ming == Ming Lei ming@canonical.com writes: There is absolutely no correlation between max write same blocks and max unmap blocks. They are two entirely different commands. If QEMU SCSI Ming Do you have any better idea for the problem? Does QEMU SCSI set LBPRZ? -- Martin K. Petersen

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

2014-12-05 Thread Ming Lei
On Fri, Dec 5, 2014 at 9:22 PM, Martin K. Petersen martin.peter...@oracle.com wrote: Ming == Ming Lei ming@canonical.com writes: There is absolutely no correlation between max write same blocks and max unmap blocks. They are two entirely different commands. If QEMU SCSI Ming Do you have

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

2014-12-05 Thread Martin K. Petersen
Ming == Ming Lei ming@canonical.com writes: Ming It isn't set in LBP VPG page. What about in READ CAPACITY(16)? -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org

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

2014-12-05 Thread Ming Lei
On Fri, Dec 5, 2014 at 9:38 PM, Martin K. Petersen martin.peter...@oracle.com wrote: Ming == Ming Lei ming@canonical.com writes: Ming It isn't set in LBP VPG page. What about in READ CAPACITY(16)? It isn't set too. Thanks, Ming Lei -- To unsubscribe from this list: send the line

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

2014-12-05 Thread Martin K. Petersen
Ming == Ming Lei ming@canonical.com writes: What about in READ CAPACITY(16)? Ming It isn't set too. Please try the following patch: [SCSI] sd: Tweak discard heuristics to work around QEMU SCSI issue 7985090aa020 changed the discard heuristics to give preference to the WRITE SAME

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

2014-12-05 Thread Ming Lei
On Fri, Dec 5, 2014 at 9:58 PM, Martin K. Petersen martin.peter...@oracle.com wrote: Ming == Ming Lei ming@canonical.com writes: What about in READ CAPACITY(16)? Ming It isn't set too. Please try the following patch: [SCSI] sd: Tweak discard heuristics to work around QEMU SCSI issue

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

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 14:58, Martin K. Petersen wrote: Ming == Ming Lei ming@canonical.com writes: What about in READ CAPACITY(16)? Ming It isn't set too. Please try the following patch: [SCSI] sd: Tweak discard heuristics to work around QEMU SCSI issue 7985090aa020 changed the

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

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 14:05, Ming Lei wrote: [ 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:

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

2014-12-05 Thread Ming Lei
On Fri, Dec 5, 2014 at 11:49 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 05/12/2014 14:05, Ming Lei wrote: [ 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