[PATCH V2] nvme: enable ro namespace for ZNS without append
Keith Busch
kbusch at kernel.org
Tue Nov 10 09:16:36 EST 2020
On Tue, Nov 10, 2020 at 10:39:38AM +0100, Javier González wrote:
> if (!(le32_to_cpu(log->iocs[nvme_cmd_zone_append]) &
> NVME_CMD_EFFECTS_CSUPP)) {
> + set_bit(NVME_NS_FORCE_RO, &ns->flags);
> dev_warn(ns->ctrl->device,
> - "append not supported for zoned namespace:%d\n",
> + "append not supported for zoned namespace:%d. Forcing to read-only mode\n",
> ns->head->ns_id);
> - return -EINVAL;
> }
In the unlikely event that a f/w upgrade adds append support, do we want
to bother clearing this flag? If so, we would need to refresh the
command effects log page.
If not, you'd have to rebind the driver to make it writable. I don't see
that as being a big deal, so I think the patch is probably fine as-is.
More information about the Linux-nvme
mailing list