Message ID | 156479010859.707590.12017196692329765020.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Improvements for namespace creation/interrogation | expand |
diff --git a/ndctl/namespace.c b/ndctl/namespace.c index 5c457224cb13..89113f760bbf 100644 --- a/ndctl/namespace.c +++ b/ndctl/namespace.c @@ -1415,6 +1415,15 @@ static int do_xaction_namespace(const char *namespace, } } + if (action == ACTION_CREATE && rc == -EAGAIN) { + /* + * Namespace creation searched through all candidate + * regions and all of them said "nope, I don't have + * enough capacity", so report -ENOSPC + */ + rc = -ENOSPC; + } + return rc; }
The create-namespace error message: failed to create namespace: Resource temporarily unavailable ...is misleading because the lack of capacity is permanent until the user frees up space. Trap EAGAIN and translate to ENOSPC in case the region capacity search fails: failed to create namespace: No space left on device Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- ndctl/namespace.c | 9 +++++++++ 1 file changed, 9 insertions(+)