* ndctl: 10G not a multiple of 2M?
@ 2017-07-26 18:47 Linda Knippers
2017-07-26 19:46 ` Dan Williams
0 siblings, 1 reply; 2+ messages in thread
From: Linda Knippers @ 2017-07-26 18:47 UTC (permalink / raw)
To: Dan Williams; +Cc: linux-nvdimm@lists.01.org
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.
> size_align = max(units, size_align) * ways;
Why is units part of the equation?
-- ljk
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ndctl: 10G not a multiple of 2M?
2017-07-26 18:47 ndctl: 10G not a multiple of 2M? Linda Knippers
@ 2017-07-26 19:46 ` Dan Williams
0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2017-07-26 19:46 UTC (permalink / raw)
To: Linda Knippers; +Cc: linux-nvdimm@lists.01.org
On Wed, Jul 26, 2017 at 11:47 AM, Linda Knippers <linda.knippers@hpe.com> wrote:
> 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.
>
>> 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
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-26 19:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-26 18:47 ndctl: 10G not a multiple of 2M? Linda Knippers
2017-07-26 19:46 ` Dan Williams
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.