-
Notifications
You must be signed in to change notification settings - Fork 55
Conversation
ac5ac2c
to
9a199e9
Compare
21de062
to
2524b1a
Compare
2524b1a
to
cc3ed83
Compare
As we discussed off-line, it could help if we used more recent libndctl, which has get_region_align function starting with v68 I believe. But our containerized build in current config will use v63 |
cc3ed83
to
2fe2bb2
Compare
I found one way to install newer ndctl, it worked on my local setup, lets try CI now. There is also call added to get region alignment value and adjust size accordingly. |
b91d4cf
to
b42d804
Compare
a35831a
to
e2998a4
Compare
We need newer-than-v67 of ndctl but buster has v63, so we install ndctl from buster-backports.
Due to a redundant sort and chaining steps with ; instead of &&, the "exit 1" after a failure did not affect the overall result of the command.
This is the outcome of the discussion in intel#933 (comment)
e2998a4
to
fa16e62
Compare
fa16e62
to
bc503b2
Compare
Added interface to get Region Alignment value. Alignment adjust happens in region.go, not in device mgr layer. Use 2M alignment instead of 1G. LVM-mode manager creation simplified: does create only one namespace per region. This eliminates problem of small leftover which will be found on next start and one more namespace created. Do not pass Align from device manager layer to region.go. region.go: added LCM and GCD functions. region.go CreateNamespace: Calculate LCM of two aligns. Align creation size up to closest LCM alignment boundary. Moved size check to happen after change by alignment.
bc503b2
to
7ae5a42
Compare
pushed version addressing recent comments. I had to change code on fake/ side to adapt to change of Opts, now the CreateNamespace is slightly different there, do you think we need to unify that to real one in this PR? This would need more work, for example new LCM() should be made common then, I did not start that part now. |
This can be done later. I had noticed that the new math functions do not really belong into the file where they were added, but decided to ignore that. |
My thinking was: opts.Size gets checked and used later in function, so I put modified value back and avoid using those other places, keeping current change impact smaller. Other fields of Opts are modified in that function as well, making Size local variable would raise question why Size deserves local variable on changing but not others |
We may adjust requested size upwards, so lets check for available
space after that.
This PR is meant to address points in #933