There have been several reports of the counts printed for namespace actions such as enable, disable, and especially destroy being incorrect and confusing. These patches are an attempt to clean up and bring greater consistency to these operations.
Patch 1 lays some groundwork for testing whether a namespace (under destroy-namespace) that is supposed to have metadata due to its personality (btt, pfn, dev-dax) has already had its info-blocks zeroed. If that is the case, then allow for skipping the zeroing, and communicate the fact. This is really only applicable for legacy namespaces as in the labeled case, the label would have been inconsistent if the metadata had been previously wiped. Patch 2 builds on the above by creating a harder separation between the result of an action vs. the number of objects (namespaces) the action actually processed. Making the result independent of the number processed allows us to make a cleaner decision on what exactly was done, and print errors and/or counts accordingly. Vishal Verma (2): ndctl, destroy-namespace: check for an already-zeroed info block ndctl, namespace: rework namespace action accounting ndctl/namespace.c | 197 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 116 insertions(+), 81 deletions(-) -- 2.14.4 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
