summaryrefslogtreecommitdiffstats
path: root/include/linux/nvme.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r--include/linux/nvme.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 2b82f05fe4ec..dc815cc6718d 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -590,6 +590,11 @@ struct nvme_command {
};
};
+static inline bool nvme_is_write(struct nvme_command *cmd)
+{
+ return cmd->common.opcode & 1;
+}
+
enum {
NVME_SC_SUCCESS = 0x0,
NVME_SC_INVALID_OPCODE = 0x1,
OpenPOWER on IntegriCloud