On 10.11.2020 06:16, Keith Busch wrote:
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.
Good point. Also useful when selecting a new FW slot. Would it make
sense to move the check to the revalidate path and eventually clear the
flag?