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

Martin K. Petersen
2022-11-01T15:49:28Z

Christoph,

> I think SCSI actually has the same semantics as NVMe here. WRITE SAME
> must always ensure reads return the data written using it,

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.

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.

Anyway. Not a big issue as far as I'm concerned. Just tainted by the
twisted heuristics I had to deal with in SCSI...

--
Martin K. Petersen Oracle Linux Engineering