nvme: Set integrity flag for user passthrough commands
authorKeith Busch <keith.busch@intel.com>
Tue, 17 Apr 2018 20:42:44 +0000 (14:42 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 3 May 2018 15:37:50 +0000 (09:37 -0600)
If the command a separate metadata buffer attached, the request needs
to have the integrity flag set so the driver knows to map it.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c

index 9df4f71e58caa0f93e8a6175cb48ec8d78f164e0..127a9cbf3314458548b28e1bc05a2a99408c2309 100644 (file)
@@ -764,6 +764,7 @@ static int nvme_submit_user_cmd(struct request_queue *q,
                                ret = PTR_ERR(meta);
                                goto out_unmap;
                        }
+                       req->cmd_flags |= REQ_INTEGRITY;
                }
        }