Re: [PATCH] nvme: implement the DEAC bit for the Write Zeroes command

Christoph Hellwig
2022-11-04T07:06:29Z

On Tue, Nov 01, 2022 at 11:49:06AM -0400, Martin K. Petersen wrote:
> Yep, but many device vendors messed that up due to the initial ambiguity
> in the spec wrt. how to handle the UNMAP flag. Based on experience with
> the SCSI UNMAP command being able to ignore blocks and ATA DSM TRIM
> being non-deterministic, several vendors ended up not treating WRITE
> SAME with the UNMAP flag set as a data integrity operation.

Uh.

> I was just concerned that this practice would carry over to NVMe. Bits
> 2:0 being set to 1 is an indication that somebody at least thought about
> this scenario during device implementation. But again, devices that
> return non-zero blocks after deallocate are rare and we can always quirk
> them if there's a problem.

I'm fine with adding the dlfeat check - it is trivial and if the bits
aren't set, sending the DEAC bit would be pointless anyway. It'll just
make the people asking for names for the unnamed bits even more unhappy..