linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: AlexChen <alex.chen@huawei.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: <jejb@linux.ibm.com>, Bart Van Assche <bvanassche@acm.org>,
	<linux-scsi@vger.kernel.org>, <zhengchuan@huawei.com>,
	<jiangyiwen@huawei.com>, <robin.yb@huawei.com>
Subject: Re: [PATCH V2] scsi: add a new flag to set whether SCSI disks support WRITE_SAME_16 by default
Date: Tue, 25 Feb 2020 11:53:31 +0800	[thread overview]
Message-ID: <5E549A3B.7030803@huawei.com> (raw)
In-Reply-To: <5E3D2513.6050505@huawei.com>

Hi Martin,

Are there any other opinions about this patch? If so, I can make
corresponding modifications.

Thanks
Alex
On 2020/2/7 16:51, AlexChen wrote:
> Hi Martin,
> 
> Thanks for your reply.
> 
>>> 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.
>>
>> Your proposed code change is fine and to the point. However, I'd like to
>> understand why you are adding a workaround to the kernel instead of
>> fixing the affected device?
>>
>> Implementing support for either WRITE SAME(10) or REPORT SUPPORTED
>> OPERATION CODES is easy. And the latter in particular is beneficial for
>> discovering several other SCSI protocol features. It's a good command to
>> support in general.
>>
> 
>>From a maintenance perspective, I think the old storage device which does
> not support WRITE SAME query interface can be easily supported by adding
> a workaround to the kernel, instead of waiting for the storage device to
> implement the query interface.
> 
>> Also, we generally don't add features to the kernel without any
>> users. So if you add a blacklist flag, I would expect to see a set of
>> device strings to be added to scsi_devinfo.c.
> 
> Through my test, I found that HUAWEI's storage devices do not provide
> queries for WRITE_SAME_16 support.
> If the lists of such devices is written into the kernel code, will it
> be incomplete and difficult to maintain? On the other hand, It would be
> more flexible if we provided the module parameter 'dev_flags' to set.
> 
> Thanks
> Alex
> 



  reply	other threads:[~2020-02-25  3:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5E28118F.3070706@huawei.com>
2020-02-01  6:54 ` [PATCH V2] scsi: add a new flag to set whether SCSI disks support WRITE_SAME_16 by default AlexChen
2020-02-05  2:30   ` Martin K. Petersen
2020-02-07  8:51     ` AlexChen
2020-02-25  3:53       ` AlexChen [this message]
2020-02-25 18:31   ` Christoph Hellwig
2020-02-26 11:50     ` AlexChen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5E549A3B.7030803@huawei.com \
    --to=alex.chen@huawei.com \
    --cc=bvanassche@acm.org \
    --cc=jejb@linux.ibm.com \
    --cc=jiangyiwen@huawei.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=robin.yb@huawei.com \
    --cc=zhengchuan@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).