ndctl/check-namespace: improve error message in absence of a BTT
Vishal Verma
maintainerPATCH 1/2 ndctl/check-namespace: improve error message in absence of a BTT
When a BTT info block is not found, check-namespace only reported something like:
namespace5.0: namespace_check: Unable to recover any BTT info blocks error checking namespaces: No such device or address checked 0 namespaces
This can be improved by suggesting a BTT might not have been present on the namespace at all, so emit an additional message such as:
namespace5.0: namespace_check: This may not be a sector mode namespace
--- ndctl/check.c | 2 ++ 1 file changed, 2 insertions(+)
ndctl/check.c +2 -0
@@ -1322,6 +1322,8 @@ int namespace_check(struct ndctl_namespace *ndns, bool verbose, bool force, rc =btt_recover_first_sb (bttc);if (rc) {err (bttc,"Unable to recover any BTT info blocks\n" ); +err (bttc, +"This may not be a sector mode namespace\n" ); goto out_close; }/*
Signature · 6 lines
2.20.1 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
Vishal Verma
maintainerPATCH 2/2 libdaxctl: point to migrate-device-model for dax-class errors
When a dax-bus vs. dax-class expectation causes a failure, such as when reconfiguring device modes, print an error message directly pointing the user to the daxctl-migrate-device-model command.
--- daxctl/lib/libdaxctl.c | 2 ++ 1 file changed, 2 insertions(+)
daxctl/lib/libdaxctl.c +2 -0
@@ -917,6 +917,7 @@ static int daxctl_dev_enable(struct daxctl_dev *dev, enum daxctl_dev_mode mode)if (!device_model_is_dax_bus (dev)) {err (ctx,"%s: error: device model is dax-class\n" , devname); +err (ctx,"%s: see man daxctl-migrate-device-model\n" , devname);return -EOPNOTSUPP ; }
@@ -962,6 +963,7 @@ DAXCTL_EXPORT int daxctl_dev_disable(struct daxctl_dev *dev)if (!device_model_is_dax_bus (dev)) {err (ctx,"%s: error: device model is dax-class\n" , devname); +err (ctx,"%s: see man daxctl-migrate-device-model\n" , devname);return -EOPNOTSUPP ; }
Signature · 6 lines
2.20.1 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [ndctl PATCH 2/2] libdaxctl: point to migrate-device-model for dax-class errors
Quoted 25 lines · Vishal Verma
When a dax-bus vs. dax-class expectation causes a failure, such as when reconfiguring device modes, print an error message directly pointing the user to the daxctl-migrate-device-model command.
Reported-by Dave Hansen <[email protected]>Reported-by Jeff Moyer <[email protected]>Cc Dan Williams <[email protected]>Signed-off-by Vishal Verma <[email protected]>--- daxctl/lib/libdaxctl.c | 2 ++ 1 file changed, 2 insertions(+)daxctl/lib/libdaxctl.c +1
-0@@ -917,6 +917,7 @@ static int daxctl_dev_enable(struct daxctl_dev *dev, enum daxctl_dev_mode mode)if (!device_model_is_dax_bus (dev)) {err (ctx,"%s: error: device model is dax-class\n" , devname); +err (ctx,"%s: see man daxctl-migrate-device-model\n" , devname);return -EOPNOTSUPP ; }
daxctl/lib/libdaxctl.c DAXCTL_EXPORT int daxctl_dev_disable(struct daxctl_dev *dev) · line 968
Quoted 6 lines
daxctl/lib/libdaxctl.c +1
-0@@ -962,6 +963,7 @@ DAXCTL_EXPORT int daxctl_dev_disable(struct daxctl_dev *dev)if (!device_model_is_dax_bus (dev)) {err (ctx,"%s: error: device model is dax-class\n" , devname); +err (ctx,"%s: see man daxctl-migrate-device-model\n" , devname);return -EOPNOTSUPP ; }
Thanks, Vishal!
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm