All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Yan <tom.ty89@gmail.com>
To: Shaun Tancheff <shaun.tancheff@seagate.com>
Cc: Shaun Tancheff <shaun@tancheff.com>,
	linux-ide@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Tejun Heo <tj@kernel.org>, Christoph Hellwig <hch@lst.de>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Damien Le Moal <damien.lemoal@hgst.com>,
	Hannes Reinecke <hare@suse.de>,
	Josh Bingaman <josh.bingaman@seagate.com>,
	Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH v6 2/4] Add support for SCT Write Same
Date: Mon, 22 Aug 2016 23:09:37 +0000	[thread overview]
Message-ID: <CAGnHSEm5Ur-7eCj-_mJsTeDwxhkGHPERAodebDS7rRg0AvGn3Q@mail.gmail.com> (raw)
In-Reply-To: <CAJVOszAHcuyLoSJwmKvK5vgM8aLqfQJsaw=Vx7K66wMEaqmu_A@mail.gmail.com>

I am not sure about what you mean here. Rejecting SCSI Write Same
commands that has its "number of blocks" field set to a value higher
than the device's reported Maximum Write Same Length is only natural
and mandated by SBC. We have no reason (even if it is practically not
a must) not to do it while we are implementing a SCSI-ATA Translation
Layer here as long as we advertise Maximum Write Same Length. It does
not matter here whether the command ends up being translated to SCT
Write Same or TRIM.

How high or how lower the limit should be advertised has nothing to do
with the checking.

FWIW, letting the SCSI/block layer fall back with SD_MAX_WS10_BLOCKS
does NOT count as advertising Maximum Write Same Length, that's why we
may or may not (in terms of SBC) check n_block against it if we are
really gonna leave ata_scsiop_inq_b0 in libata-scsi untouched.

On 22 August 2016 at 22:07, Shaun Tancheff <shaun.tancheff@seagate.com> wrote:
> On Mon, Aug 22, 2016 at 3:14 PM, Tom Yan <tom.ty89@gmail.com> wrote:
>> On 23 August 2016 at 03:43, Shaun Tancheff <shaun.tancheff@seagate.com> wrote:
>>>
>>> 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.
>
> Breaking would be advertising a limit that is too high and failing.
> Advertising a lower limit and succeeding may not be ideal for all
> possible use cases, but it's not breaking behaviour.
>
>>>
>>> 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".
>
> --
> Shaun Tancheff

  reply	other threads:[~2016-08-22 23:09 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-22  4:23 [PATCH v6 0/4] SCT Write Same Shaun Tancheff
2016-08-22  4:23 ` [PATCH v6 1/4] libata: Safely overwrite attached page in WRITE SAME xlat Shaun Tancheff
2016-08-22  6:27   ` Hannes Reinecke
2016-08-22 19:27   ` Tom Yan
2016-08-22 19:51     ` Shaun Tancheff
2016-08-22 20:12       ` Tom Yan
2016-08-22 21:20   ` Tom Yan
2016-08-22 22:00     ` Shaun Tancheff
2016-08-22 23:49       ` Tom Yan
2016-08-23  1:01         ` Shaun Tancheff
2016-08-23  5:26           ` Tom Yan
2016-08-23  6:20             ` Shaun Tancheff
2016-08-23  7:53               ` Tom Yan
2016-08-23  8:42                 ` Shaun Tancheff
2016-08-23  9:04                   ` Tom Yan
2016-08-24  3:33                 ` Martin K. Petersen
2016-08-24  5:31                   ` Tom Yan
2016-08-24 21:28                     ` Shaun Tancheff
2016-08-25  6:31                       ` Tom Yan
2016-08-25  7:18                         ` Shaun Tancheff
2016-08-22  4:23 ` [PATCH v6 2/4] Add support for SCT Write Same Shaun Tancheff
2016-08-22  6:27   ` Hannes Reinecke
2016-08-22 19:20   ` Tom Yan
2016-08-22 19:43     ` Shaun Tancheff
2016-08-22 20:14       ` Tom Yan
2016-08-22 22:07         ` Shaun Tancheff
2016-08-22 23:09           ` Tom Yan [this message]
2016-08-23  0:36             ` Shaun Tancheff
2016-08-23  5:55               ` Tom Yan
2016-08-23  6:11                 ` Shaun Tancheff
2016-08-23  7:57                   ` Tom Yan
2016-08-23 10:37   ` Tom Yan
2016-08-23 10:56     ` Shaun Tancheff
2016-08-24  5:57       ` Tom Yan
2016-08-24  6:10         ` Tom Yan
2016-08-24 22:04           ` Shaun Tancheff
2016-08-25  6:23             ` Tom Yan
2016-08-25  7:31               ` Shaun Tancheff
2016-08-22  4:23 ` [PATCH v6 3/4] SCT Write Same / DSM Trim Shaun Tancheff
2016-08-22  6:30   ` Hannes Reinecke
2016-08-24 18:08     ` [PATCH v6 3/4 RESEND] " Shaun Tancheff
2016-08-25  7:01       ` Tom Yan
2016-08-25  8:03         ` Shaun Tancheff
2016-08-25  9:30           ` Tom Yan
2016-08-22  8:31   ` [PATCH v6 3/4] " Tom Yan
2016-08-22  8:33     ` Tom Yan
2016-08-22 15:04       ` Shaun Tancheff
2016-08-22 17:02         ` Tom Yan
2016-08-22 18:00           ` Shaun Tancheff
2016-08-22 18:52             ` Tom Yan
2016-08-22 20:57               ` Tom Yan
2016-08-22  4:23 ` [PATCH v6 4/4] SCT Write Same handle ATA_DFLAG_PIO Shaun Tancheff
2016-08-22  6:31   ` Hannes Reinecke
2016-08-22  6:32 ` [PATCH v6 0/4] SCT Write Same Hannes Reinecke
2016-08-25 15:28 ` Tejun Heo

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=CAGnHSEm5Ur-7eCj-_mJsTeDwxhkGHPERAodebDS7rRg0AvGn3Q@mail.gmail.com \
    --to=tom.ty89@gmail.com \
    --cc=damien.lemoal@hgst.com \
    --cc=hare@suse.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=josh.bingaman@seagate.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.