nvme: fix write zeroes pi
authorKlaus Jensen <k.jensen@samsung.com>
Wed, 10 Nov 2021 09:19:06 +0000 (10:19 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 23 Nov 2021 16:22:41 +0000 (17:22 +0100)
commit00b33cf3da726757aef636365bb52e9536434e9a
tree07f2f8b1eb2b571e699e45771c3540d83cbeb6a7
parent8e8aaf512a91ae44d40647a88b51326c7b0a70a8
nvme: fix write zeroes pi

Write Zeroes sets PRACT when block integrity is enabled (as it should),
but neglects to also set the reftag which is expected by reads. This
causes protection errors on reads.

Fix this by setting the reftag for type 1 and 2 (for type 3, reads will
not check the reftag).

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c