From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Shaun Tancheff <shaun@tancheff.com>
Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Tejun Heo <tj@kernel.org>, Christoph Hellwig <hch@lst.de>,
Shaun Tancheff <shaun.tancheff@seagate.com>
Subject: Re: [PATCH v3] Add support for SCT Write Same
Date: Tue, 21 Jun 2016 22:43:07 -0400 [thread overview]
Message-ID: <yq17fdi2bb8.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <1466435028-13886-2-git-send-email-shaun@tancheff.com> (Shaun Tancheff's message of "Mon, 20 Jun 2016 10:03:48 -0500")
>>>>> "Shaun" == Shaun Tancheff <shaun@tancheff.com> writes:
Shaun> SATA drives may support write same via SCT. This is useful for
Shaun> setting the drive contents to a specific pattern (0's).
As indicated a while back, my preference would be for you to add support
for REPORT SUPPORTED OPERATION CODES. It's fine that you keep the RSOC
response simple and only list WRITE SAME(10/16). But I want to avoid
having different heuristics for libata's SCSI-ATA translation and for
hardware controller ditto.
Shaun> If UNMAP is not set or TRIM is not available
Please do not conflate the two. We have the appropriate fallbacks at the
block layer. It happens to be the same command descriptor but it is two
very different implementations at the device level.
If the UNMAP bit is set you need to issue a DSM TRIM. If the device does
not support TRIM you need to return ILLEGAL REQUEST/INVALID FIELD IN
CDB.
If the UNMAP bit is not set then it's a regular WRITE SAME and should be
issued using SCT WRITE SAME. If the device does not support SCT WRITE
SAME you need to return ILLEGAL REQUEST/INVALID FIELD IN CDB.
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2016-06-22 2:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 15:03 [PATCH v3] Add support for Write Same via SCT Shaun Tancheff
2016-06-20 15:03 ` [PATCH v3] Add support for SCT Write Same Shaun Tancheff
2016-06-21 12:41 ` Christoph Hellwig
2016-06-22 2:43 ` Martin K. Petersen [this message]
2016-06-22 3:01 ` Shaun Tancheff
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=yq17fdi2bb8.fsf@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=hch@lst.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=shaun.tancheff@seagate.com \
--cc=shaun@tancheff.com \
--cc=tj@kernel.org \
/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