From: Sagi Grimberg Date: Wed, 21 Sep 2016 18:06:32 +0000 (-0700) Subject: nvmet: Use direct IO for writes X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9b349b080ca9777f6dab3da06d7fa4577f7d4c29;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git nvmet: Use direct IO for writes We're designed to work with high-end devices where direct IO makes perfect sense. We noticed that we context switch by scheduling kblockd instead of going directly to the device without REQ_SYNC for writes. Signed-off-by: Sagi Grimberg Reviewed-by: Jens Axboe --- diff --git a/drivers/nvme/target/io-cmd.c b/drivers/nvme/target/io-cmd.c index 2cd069b691ae..4132b6b98182 100644 --- a/drivers/nvme/target/io-cmd.c +++ b/drivers/nvme/target/io-cmd.c @@ -58,6 +58,7 @@ static void nvmet_execute_rw(struct nvmet_req *req) if (req->cmd->rw.opcode == nvme_cmd_write) { op = REQ_OP_WRITE; + op_flags = WRITE_ODIRECT; if (req->cmd->rw.control & cpu_to_le16(NVME_RW_FUA)) op_flags |= REQ_FUA; } else {