[PATCHv4 13/13] nvmet: report ns's vwc not present

Christoph Hellwig hch at lst.de
Fri Nov 8 06:27:43 PST 2024


On Thu, Nov 07, 2024 at 11:38:48AM -0800, Keith Busch wrote:
> diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
> index 516af7b419189..f688d7fdf7d67 100644
> --- a/drivers/nvme/target/admin-cmd.c
> +++ b/drivers/nvme/target/admin-cmd.c
> @@ -915,6 +915,9 @@ static void nvmet_execute_id_cs_indep(struct nvmet_req *req)
>  		id->nsattr |= NVME_NS_ATTR_RO;
>  	if (req->ns->bdev && !bdev_nonrot(req->ns->bdev))
>  		id->nsfeat |= NVME_NS_ROTATIONAL;
> +	if ((req->ns->file && !req->ns->buffered_io) ||

I don't think this check is correct.  Direct I/O still requires cache
flushes for durability.




More information about the Linux-nvme mailing list