nvme: implement support for relaxed effects
NVM Express TP4167 provides a way for controllers to report a relaxed execution constraint. Specifically, it notifies of exclusivity for IO vs. admin commands instead of grouping these together. If set, then we don't need to freeze IO in order to execute that admin command. The freezing distrupts IO processes, so it's nice to avoid that if the controller tells us it's not necessary. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
parent
79bd7eab83
commit
29f6975332
@ -1153,6 +1153,10 @@ u32 nvme_command_effects(struct nvme_ctrl *ctrl, struct nvme_ns *ns, u8 opcode)
|
||||
effects &= ~NVME_CMD_EFFECTS_CSE_MASK;
|
||||
} else {
|
||||
effects = le32_to_cpu(ctrl->effects->acs[opcode]);
|
||||
|
||||
/* Ignore execution restrictions if any relaxation bits are set */
|
||||
if (effects & NVME_CMD_EFFECTS_CSER_MASK)
|
||||
effects &= ~NVME_CMD_EFFECTS_CSE_MASK;
|
||||
}
|
||||
|
||||
return effects;
|
||||
|
@ -646,6 +646,7 @@ enum {
|
||||
NVME_CMD_EFFECTS_NCC = 1 << 2,
|
||||
NVME_CMD_EFFECTS_NIC = 1 << 3,
|
||||
NVME_CMD_EFFECTS_CCC = 1 << 4,
|
||||
NVME_CMD_EFFECTS_CSER_MASK = GENMASK(15, 14),
|
||||
NVME_CMD_EFFECTS_CSE_MASK = GENMASK(18, 16),
|
||||
NVME_CMD_EFFECTS_UUID_SEL = 1 << 19,
|
||||
NVME_CMD_EFFECTS_SCOPE_MASK = GENMASK(31, 20),
|
||||
|
Loading…
x
Reference in New Issue
Block a user