linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: AlexChen <alex.chen@huawei.com>
Cc: <jejb@linux.ibm.com>, <martin.petersen@oracle.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, 04 Feb 2020 21:30:02 -0500	[thread overview]
Message-ID: <yq14kw522c5.fsf@oracle.com> (raw)
In-Reply-To: <5E3520A7.5030501@huawei.com> (AlexChen's message of "Sat, 1 Feb 2020 14:54:31 +0800")


Hi Alex,

> 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.

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.

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2020-02-05  2:30 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 [this message]
2020-02-07  8:51     ` AlexChen
2020-02-25  3:53       ` AlexChen
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=yq14kw522c5.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=alex.chen@huawei.com \
    --cc=bvanassche@acm.org \
    --cc=jejb@linux.ibm.com \
    --cc=jiangyiwen@huawei.com \
    --cc=linux-scsi@vger.kernel.org \
    --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).