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
Link:
https://github.com/pmem/ndctl/issues/43
Reported-by: Jane Chu <jane.chu(a)oracle.com>
Reported-by: Scott Davenport <scott.davenport(a)oracle.com>
Signed-off-by: Vishal Verma <vishal.l.verma(a)intel.com>
---
ndctl/check.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ndctl/check.c b/ndctl/check.c
index 5969012..365abaf 100644
--- a/ndctl/check.c
+++ b/ndctl/check.c
@@ -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;
}
/*
--
2.20.1