Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b349b08 authored by Sagi Grimberg's avatar Sagi Grimberg
Browse files

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: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarJens Axboe <axboe@kernel.dk>
parent 2d79c7dc
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -58,6 +58,7 @@ static void nvmet_execute_rw(struct nvmet_req *req)


	if (req->cmd->rw.opcode == nvme_cmd_write) {
	if (req->cmd->rw.opcode == nvme_cmd_write) {
		op = REQ_OP_WRITE;
		op = REQ_OP_WRITE;
		op_flags = WRITE_ODIRECT;
		if (req->cmd->rw.control & cpu_to_le16(NVME_RW_FUA))
		if (req->cmd->rw.control & cpu_to_le16(NVME_RW_FUA))
			op_flags |= REQ_FUA;
			op_flags |= REQ_FUA;
	} else {
	} else {