Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1468019
| From | Tom Yan <tom.ty89@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 2/4] Add support for SCT Write Same |
| Date | 2016-08-22 22:20 +0200 |
| Message-ID | <s93Rn-2Ah-7@gated-at.bofh.it> (permalink) |
| References | <s8P21-1r7-3@gated-at.bofh.it> <s8P21-1r7-1@gated-at.bofh.it> <s9350-22o-35@gated-at.bofh.it> <s93om-2au-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 23 August 2016 at 03:43, Shaun Tancheff <shaun.tancheff@seagate.com> wrote:
>>> + if (unmap) {
>>> + /* If trim is not enabled the cmd is invalid. */
>>> + if ((dev->horkage & ATA_HORKAGE_NOTRIM) ||
>>> + !ata_id_has_trim(dev->id)) {
>>> + fp = 1;
>>> + bp = 3;
>>> + goto invalid_fld;
>>> + }
>>> + /* If the request is too large the cmd is invalid */
>>> + if (n_block > 0xffff * trmax) {
>>> + fp = 2;
>>> + goto invalid_fld;
>>> + }
>>
>> This response should be generally applied to the Write Same (16)
>> translation, since it is required by SBC,
>>
>>> + } else {
>>> + /* If write same is not available the cmd is invalid */
>>> + if (!ata_id_sct_write_same(dev->id)) {
>>> + fp = 1;
>>> + bp = 3;
>>> + goto invalid_fld;
>>> + }
>>
>> therefore, you should add an n_block check here as well, if you are
>> going to advertise an Maximum Write Same Length even when the device
>> supports only SCT Write Same but not TRIM. Most likely you would want
>> to simply move the existing check one-level up (if the same limit is
>> advertised no matter TRIM is supported not or not).
>
> Why would we enforce upper level limits on something that doesn't
> have any?
If we advertise a limit in our SATL, it makes sense that we should
make sure the behaviour is consistent when we issue a write same
through the block layer / ioctl and when we issue a SCSI Write Same
command directly (e.g. with sg_write_same). IMHO that's pretty much
why SBC would mandate such behaviour as well.
>
> If the upper level, or SG_IO, chooses to set a timeout of 10 hours and
> wipe a whole disk it should be free to do so.
>
That's why I said, "if you are going to advertise an Maximum Write Same Length".
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v6 2/4] Add support for SCT Write Same Shaun Tancheff <shaun@tancheff.com> - 2016-08-22 06:30 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Hannes Reinecke <hare@suse.de> - 2016-08-22 08:30 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Tom Yan <tom.ty89@gmail.com> - 2016-08-22 21:30 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Shaun Tancheff <shaun.tancheff@seagate.com> - 2016-08-22 21:50 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Tom Yan <tom.ty89@gmail.com> - 2016-08-22 22:20 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Shaun Tancheff <shaun.tancheff@seagate.com> - 2016-08-23 00:10 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Tom Yan <tom.ty89@gmail.com> - 2016-08-23 01:10 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Shaun Tancheff <shaun.tancheff@seagate.com> - 2016-08-23 02:40 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Tom Yan <tom.ty89@gmail.com> - 2016-08-23 08:00 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Shaun Tancheff <shaun.tancheff@seagate.com> - 2016-08-23 08:20 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Tom Yan <tom.ty89@gmail.com> - 2016-08-23 10:10 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Tom Yan <tom.ty89@gmail.com> - 2016-08-23 12:50 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Shaun Tancheff <shaun.tancheff@seagate.com> - 2016-08-23 13:00 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Tom Yan <tom.ty89@gmail.com> - 2016-08-24 08:00 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Tom Yan <tom.ty89@gmail.com> - 2016-08-24 08:20 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Shaun Tancheff <shaun@tancheff.com> - 2016-08-25 00:10 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Tom Yan <tom.ty89@gmail.com> - 2016-08-25 08:50 +0200
Re: [PATCH v6 2/4] Add support for SCT Write Same Shaun Tancheff <shaun.tancheff@seagate.com> - 2016-08-25 09:50 +0200
csiph-web