ndctl: 10G not a multiple of 2M?
Hi Dan,
I was creating a namespace on a 4-way interleave set and got an error I didn't expect:
$ sudo ndctl create-namespace -m sector -s 10G -n number2 Error: '--size=' must align to interleave-width: 4 and alignment: 2097152 did you intend --size=12G?
I think there's a bug in validate_namespace_options().
What's happening is that since I specified my size in units of G, the function wants the namespace to be 1G * 4 aligned rather than 2M * 4 aligned. I suspect if I specified my size in M, it would have worked but I can't test that at the moment.
Quoted 1 line
size_align=max(units, size_align)* ways;
Why is units part of the equation?
-- ljk
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 11 lines · Linda Knippers
Hi Dan,
I was creating a namespace on a 4-way interleave set and got an error I didn't expect:
$ sudo ndctl create-namespace -m sector -s 10G -n number2 Error: '--size=' must align to interleave-width: 4 and alignment: 2097152 did you intend --size=12G?I think there's a bug in
validate_namespace_options().
Quoted 8 lines
What's happening is that since I specified my size in units of G, the function wants the namespace to be 1G * 4 aligned rather than 2M * 4 aligned. I suspect if I specified my size in M, it would have worked but I can't test that at the moment.
Quoted 1 line
size_align=max(units, size_align)* ways;Why is units part of the equation?
Good question, looks like a blatant thinko to me. I think we're good to just do:
size_align *= ways;
However, I still want to make the recommendation in terms of the units specified for --size, but that calculation should come after the base alignment check.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm