From: Christoph Hellwig <hch@lst.de>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
sagi@grimberg.me, linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme: implement the DEAC bit for the Write Zeroes command
Date: Tue, 1 Nov 2022 10:58:04 +0100 [thread overview]
Message-ID: <20221101095804.GA13058@lst.de> (raw)
In-Reply-To: <yq17d0gq9oq.fsf@ca-mkp.ca.oracle.com>
On Mon, Oct 31, 2022 at 11:48:08AM -0400, Martin K. Petersen wrote:
>
> Keith,
>
> > The device must return all 0's for the range covered by a write zeroes
> > command no matter what. The controller shall not deallocate the
> > logical blocks if it can't guarantee reading deallocated blocks will
> > return 0's, so I think it's okay to skip checking the lower dlfeat
> > bits.
>
> The spec is sufficiently vague for the does-not-return-zeroes case that
> I'm concerned about "shall not deallocate" being interpreted by vendors
> as "free to ignore" based on past ATA/SCSI experience.
I think SCSI actually has the same semantics as NVMe here. WRITE SAME
must always ensure reads return the data written using it, just like
for Write Zeros in NVMe except that NVMe forces the 0s while SCSI
is more flexible. UNMAP in SCSI and DSM Deallocate in NVMe can also
return other values depending on the conditions.
next prev parent reply other threads:[~2022-11-01 9:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-30 16:29 [PATCH] nvme: implement the DEAC bit for the Write Zeroes command Christoph Hellwig
2022-10-31 9:01 ` Guixin Liu
2022-10-31 14:43 ` Pankaj Raghav
2022-10-31 14:54 ` Martin K. Petersen
2022-10-31 15:07 ` Keith Busch
2022-10-31 15:48 ` Martin K. Petersen
2022-11-01 9:58 ` Christoph Hellwig [this message]
2022-11-01 15:49 ` Martin K. Petersen
2022-11-04 7:06 ` Christoph Hellwig
2022-11-01 9:59 ` Christoph Hellwig
2022-11-02 10:46 ` Niklas Cassel
2022-11-02 15:56 ` Chaitanya Kulkarni
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=20221101095804.GA13058@lst.de \
--to=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=martin.petersen@oracle.com \
--cc=sagi@grimberg.me \
/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