@@ -544,7 +544,6 @@ static int get_stats(int argc, char **argv, struct command *acmd,
544544 nvme_print_flags_t flags = 0 ;
545545 struct nvme_passthru_cmd cmd ;
546546 struct nvme_id_ctrl ctrl ;
547- bool local_storage = false;
548547 bool detail = false;
549548 unsigned int interval = 0 ;
550549 size_t len ;
@@ -561,7 +560,7 @@ static int get_stats(int argc, char **argv, struct command *acmd,
561560
562561 NVME_ARGS (opts ,
563562 OPT_FLAG ("details" , 'd' , & detail , "Detail IO histogram of each block size ranges" ),
564- OPT_UINT ("interval" , 'i' , & interval , "Polling interval in seconds (local storage only) " ));
563+ OPT_UINT ("interval" , 'i' , & interval , "Polling interval in seconds" ));
565564
566565 rc = parse_and_open (& ctx , & hdl , argc , argv , desc , opts );
567566 if (rc )
@@ -575,7 +574,6 @@ static int get_stats(int argc, char **argv, struct command *acmd,
575574
576575 if (!strncmp ((char * )ctrl .mn , AMZN_NVME_LOCAL_STORAGE_PREFIX ,
577576 strlen (AMZN_NVME_LOCAL_STORAGE_PREFIX ))) {
578- local_storage = true;
579577 if (nvme_get_nsid (hdl , & nsid ) < 0 ) {
580578 struct nvme_id_ctrl test_ctrl ;
581579
@@ -591,13 +589,6 @@ static int get_stats(int argc, char **argv, struct command *acmd,
591589 len = sizeof (log .base );
592590 }
593591
594- if (interval > 0 && !local_storage ) {
595- fprintf (stderr , "[ERROR] %s: Interval polling is only supported for local storage devices\n" ,
596- __func__ );
597- rc = - EINVAL ;
598- goto done ;
599- }
600-
601592 nvme_init_get_log (& cmd , nsid , AMZN_NVME_STATS_LOGPAGE_ID , NVME_CSI_NVM ,
602593 & log , len );
603594 rc = nvme_get_log (hdl , & cmd , false, NVME_LOG_PAGE_PDU_SIZE );
0 commit comments