nvmecontrol: read controller identify data before any log page operations
MFC after: 3 days Sponsored by: Intel
This commit is contained in:
parent
5f7d6682c5
commit
628683cb81
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=285796
@ -298,6 +298,8 @@ logpage(int argc, char *argv[])
|
|||||||
open_dev(argv[optind], &fd, 1, 1);
|
open_dev(argv[optind], &fd, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
read_controller_data(fd, &cdata);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The log page attribtues indicate whether or not the controller
|
* The log page attribtues indicate whether or not the controller
|
||||||
* supports the SMART/Health information log page on a per
|
* supports the SMART/Health information log page on a per
|
||||||
@ -307,7 +309,6 @@ logpage(int argc, char *argv[])
|
|||||||
if (log_page != NVME_LOG_HEALTH_INFORMATION)
|
if (log_page != NVME_LOG_HEALTH_INFORMATION)
|
||||||
errx(1, "log page %d valid only at controller level",
|
errx(1, "log page %d valid only at controller level",
|
||||||
log_page);
|
log_page);
|
||||||
read_controller_data(fd, &cdata);
|
|
||||||
if (cdata.lpa.ns_smart == 0)
|
if (cdata.lpa.ns_smart == 0)
|
||||||
errx(1,
|
errx(1,
|
||||||
"controller does not support per namespace "
|
"controller does not support per namespace "
|
||||||
|
Loading…
Reference in New Issue
Block a user