nvme: don't warn on block content change effects
authorKeith Busch <keith.busch@intel.com>
Wed, 13 Mar 2019 17:54:55 +0000 (18:54 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 13 Mar 2019 18:05:39 +0000 (12:05 -0600)
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 <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c

index 07bf2bf..dc16412 100644 (file)
@@ -1250,7 +1250,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);