Hi Christoph, Thanks for your reply. On 2020/2/26 2:31, Christoph Hellwig wrote: > On Sat, Feb 01, 2020 at 02:54:31PM +0800, AlexChen wrote: >> When the SCSI device is initialized, check whether it supports >> WRITE_SAME_16 or WRITE_SAME_10 in the sd_read_write_same(). If >> the back-end storage device does not support queries, it will not >> set sdkp->ws16 as 1. >> >> When the WRITE_SAME io is issued through the blkdev_issue_write_same(), >> the WRITE_SAME type is set to WRITE_SAME_10 by default in >> the sd_setup_write_same_cmnd() since of "sdkp->ws16=0". If the storage >> device does not support WRITE_SAME_10, then the SCSI device is set to >> not support WRITE_SAME. >> >> Currently, some storage devices do not provide queries for WRITE_SAME_16 >> support, and only WRITE_SAME_16 is supported, not WRITE_SAME_10. >> Therefore, we need to provide a new flag for these storage devices. When >> initializing these devices, we will no longer query for support for >> WRITE_SAME_16 in the sd_read_write_same(), but set these SCSI disks to >> support WRITE_SAME_16 by default. In that way, we can add >> 'vendor:product:flag' to the module parameter 'dev_flags' for these >> storage devices. > > Please send this along with the patch that actually sets the flag > somewhere.. > If we want Huawei storage device to support WRITE_SAME_16 by default, we can add module parameter dev_flags='HUAWEI::17179869184' to the kernel command line parameters. Do you mean I need to add these to this patch description? Thanks Alex