nvme: enumerate controller flags
authorSagi Grimberg <sagi@grimberg.me>
Thu, 22 Sep 2022 08:15:36 +0000 (11:15 +0300)
committerChristoph Hellwig <hch@lst.de>
Tue, 27 Sep 2022 07:22:07 +0000 (09:22 +0200)
We expect to grow a few of these flags for various purposes
so make them a proper enumeration.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/nvme.h

index 7055502..6b4984e 100644 (file)
@@ -233,6 +233,11 @@ struct nvme_fault_inject {
 #endif
 };
 
+enum nvme_ctrl_flags {
+       NVME_CTRL_FAILFAST_EXPIRED      = 0,
+       NVME_CTRL_ADMIN_Q_STOPPED       = 1,
+};
+
 struct nvme_ctrl {
        bool comp_seen;
        enum nvme_ctrl_state state;
@@ -354,8 +359,6 @@ struct nvme_ctrl {
        u16 maxcmd;
        int nr_reconnects;
        unsigned long flags;
-#define NVME_CTRL_FAILFAST_EXPIRED     0
-#define NVME_CTRL_ADMIN_Q_STOPPED      1
        struct nvmf_ctrl_options *opts;
 
        struct page *discard_page;