@@ -15,6 +15,7 @@
#include <ccan/array_size/array_size.h>
#include <linux/types.h>
+#include <sys/user.h>
struct nd_cmd_dimm_flags {
__u32 status;
@@ -210,7 +211,7 @@ enum nd_driver_flags {
};
enum {
- ND_MIN_NAMESPACE_SIZE = 0x00400000,
+ ND_MIN_NAMESPACE_SIZE = PAGE_SIZE,
};
enum ars_masks {
@@ -232,6 +232,11 @@ static int do_test(struct ndctl_ctx *ctx, struct ndctl_test *test)
uuid_unparse(namespaces[i].uuid, uuid_str);
size = ndctl_namespace_get_size(victim);
+ rc = ndctl_namespace_disable(victim);
+ if (rc) {
+ fprintf(stderr, "failed to disable %s\n", uuid_str);
+ return rc;
+ }
rc = ndctl_namespace_delete(victim);
if (rc) {
fprintf(stderr, "failed to delete %s\n", uuid_str);
The kernel starting with version v4.16 supports a minimum namespace size as low as PAGE_SIZE. Update the dpa-alloc test to account for the fact that its 4K allocations may result in the namespace being activated with its parent region. Cc: Matthew Wilcox <willy@infradead.org> Reported-by: Cheng-mean Liu <soccerl@microsoft.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- ndctl/ndctl.h | 3 ++- test/dpa-alloc.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-)