From ff1ab644b21cd803a4509e837456de754a8b9112 Mon Sep 17 00:00:00 2001 From: Keith Busch Date: Thu, 10 Jun 2021 16:41:57 +0800 Subject: [PATCH] nvme: don't warn on block content change effects mainline inclusion from mainline-5.1 commit 415df90b437f2b026ed37af2f812e41fc06c7f90 category: bugfix bugzilla: NA CVE: NA ------------------------------------------------- A write or flush IO passthrough command is expected to change the logical block content, so don't warn on these as no additional handling is necessary. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe Signed-off-by: Wenchao Hao Reviewed-by: Weifeng Su Reviewed-by: Yufen Yu Signed-off-by: Yang Yingliang --- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index aedbe52545fc..b6ec73c77c18 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1280,7 +1280,7 @@ static u32 nvme_passthru_start(struct nvme_ctrl *ctrl, struct nvme_ns *ns, if (ns) { if (ctrl->effects) effects = le32_to_cpu(ctrl->effects->iocs[opcode]); - if (effects & ~NVME_CMD_EFFECTS_CSUPP) + if (effects & ~(NVME_CMD_EFFECTS_CSUPP | NVME_CMD_EFFECTS_LBCC)) dev_warn(ctrl->device, "IO command:%02x has unhandled effects:%08x\n", opcode, effects); -- GitLab