Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: NVMe: ioctl support for FLUSH command
@ 2013-11-04 16:34 David Milburn
  2013-11-04 17:12 ` Keith Busch
  0 siblings, 1 reply; 2+ messages in thread
From: David Milburn @ 2013-11-04 16:34 UTC (permalink / raw)


Support for user space application to submit FLUSH command.

Signed-off-by: David Milburn <dmilburn at redhat.com>
---
 drivers/block/nvme-core.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index da52092..4fab135 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -1392,6 +1392,10 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
 	case nvme_cmd_compare:
 		iod = nvme_map_user_pages(dev, io.opcode & 1, io.addr, length);
 		break;
+	case nvme_cmd_flush:
+		nvmeq = get_nvmeq(dev);
+		status = nvme_submit_flush_data(nvmeq, ns);
+		return status;
 	default:
 		return -EINVAL;
 	}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-04 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-04 16:34 [PATCH]: NVMe: ioctl support for FLUSH command David Milburn
2013-11-04 17:12 ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox