]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
Modify changed zone list command to issue get-log
authorSteven Seungcheol Lee <sc108.lee@samsung.com>
Mon, 19 Aug 2019 07:32:25 +0000 (09:32 +0200)
committerSteven Seungcheol Lee <sc108.lee@samsung.com>
Tue, 23 Jun 2020 05:36:27 +0000 (14:36 +0900)
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Co-authored-by: Klaus Jensen <k.jensen@samsung.com>
linux/nvme.h
nvme-ioctl.c
nvme-ioctl.h
plugins/zns/zns.c

index d0c1d517b2a24340624825c9d60f230ef15c4b20..08d5603c646399b038f0e5671f7115304d6da0e2 100644 (file)
@@ -1062,6 +1062,7 @@ enum {
        NVME_LOG_DISC           = 0x70,
        NVME_LOG_RESERVATION    = 0x80,
        NVME_LOG_SANITIZE       = 0x81,
+       NVME_LOG_ZONE_CHANGED_LIST = 0xbf,
        NVME_FWACT_REPL         = (0 << 3),
        NVME_FWACT_REPL_ACTV    = (1 << 3),
        NVME_FWACT_ACTV         = (2 << 3),
index 15fee249dd0fe3675fa72ec7ed7fc92ccaaa62f3..4da1d11a68d25792173532cc8ab68cc5c1e7d8c1 100644 (file)
@@ -996,9 +996,3 @@ int nvme_zns_append(int fd, __u32 nsid, __u64 zslba, __u16 nlb, __u16 control,
                *result = cmd.result;
        return err;
 }
-
-int nvme_get_log_zns_changed_zones(int fd, __u32 nsid, bool rae,
-                                  struct nvme_zns_changed_zone_log *log)
-{
-       return 0;
-}
index bac934c0f635a100c9f0fcce7bcda54fcbac5b7c..6be125464240ee1a6fa8305e0875df5a0d60b220 100644 (file)
@@ -170,7 +170,5 @@ int nvme_zns_append(int fd, __u32 nsid, __u64 zslba, __u16 nlb, __u16 control,
                    __u32 ilbrt, __u16 lbat, __u16 lbatm, __u32 data_len,
                    void *data, __u32 metadata_len, void *metadata,
                    __u64 *result);
-int nvme_get_log_zns_changed_zones(int fd, __u32 nsid, bool rae,
-                                  struct nvme_zns_changed_zone_log *log);
 
 #endif                         /* _NVME_LIB_H */
index 8a9b6dc307313113ecd7b4aced9861862ea8eb1f..164446ecc70db1d79fba33672ba6155183fa510e 100644 (file)
@@ -841,7 +841,8 @@ static int changed_zone_list(int argc, char **argv, struct command *cmd, struct
                }
        }
 
-       err = nvme_get_log_zns_changed_zones(fd, cfg.namespace_id, cfg.rae, &log);
+       err = nvme_get_log(fd, cfg.namespace_id, NVME_LOG_ZONE_CHANGED_LIST, 
+                                               cfg.rae, sizeof(log), &log);
        if (!err)
                nvme_show_zns_changed(&log, flags);
        else