[PATCH v2 2/2] nvme: all namespaces in a subsystem must adhere to a common atomic write size

Christoph Hellwig hch at lst.de
Wed May 7 23:48:21 PDT 2025


On Wed, May 07, 2025 at 04:41:35PM -0700, Alan Adamson wrote:
> +		/*
> +		 * Set subsystem atomic bs.
> +		 */
> +		if (ns->ctrl->subsys->atomic_bs) {
> +			if (atomic_bs > ns->ctrl->subsys->atomic_bs) {
> +				pr_err_ratelimited("%s: Inconsistent Atomic Write Size: Subsystem=%d bytes, Controller/Namespace=%d bytes\n",
> +					ns->disk ? ns->disk->disk_name : "?",
> +					ns->ctrl->subsys->atomic_bs,
> +					atomic_bs);

Maybe mentioned that the controlled is not added as well here?

> +	if (lim.atomic_write_hw_max > ns->ctrl->subsys->atomic_bs) {
> +		blk_mq_unfreeze_queue(ns->disk->queue, memflags);
> +		ret = -ENXIO;
> +		goto out;
> +	}

And add a comment here explaining the check?

Otherwise this looks good.



More information about the Linux-nvme mailing list