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

Martin K. Petersen martin.petersen at oracle.com
Mon Oct 31 07:54:40 PDT 2022


Hi Christoph!

> +	if (!(req->cmd_flags & REQ_NOUNMAP) && ns->dlfeat & (1 << 3))
> +		cmnd->write_zeroes.control |= cpu_to_le16(NVME_WZ_DEAC);

Shouldn't we also verify that DLFEAT bits 2:0 are equal to 1 to ensure
that deallocated blocks actually return zeroes?

Looks good otherwise.

-- 
Martin K. Petersen	Oracle Linux Engineering



More information about the Linux-nvme mailing list