Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(zfspv): rounding off the volume size to Gi and Mi #191

Merged
merged 2 commits into from
Aug 7, 2020

Conversation

pawanpraka1
Copy link
Contributor

@pawanpraka1 pawanpraka1 commented Aug 6, 2020

ref: #188

Signed-off-by: Pawan pawan@mayadata.io

Why is this PR required? What issue does it fix?:

ZFS does not create the zvol if volume size is not multiple of
the volblocksize. There are use cases where customer will create
a PVC with size as 5G, which will be 5 * 1000 * 1000 * 1000 bytes
and this is not the multiple of default volblocksize 8k.

What this PR does?:
In ZFS, volblocksize and recordsize must be power of 2 from 512B to 1M,
so keeping the size in the form of Gi or Mi should be
sufficient to make volsize multiple of volblocksize/recordsize.

Checklist:

  • Fixes #
  • PR Title follows the convention of <type>(<scope>): <subject>
  • Has the change log section been updated?
  • Commit has unit tests
  • Commit has integration tests
  • (Optional) Are upgrade changes included in this PR? If not, mention the issue/PR to track:
  • (Optional) If documentation changes are required, which issue on https://github.com/openebs/openebs-docs is used to track them:

@pawanpraka1 pawanpraka1 added the bug Something isn't working. label Aug 6, 2020
@pawanpraka1 pawanpraka1 added this to the v0.10 milestone Aug 6, 2020
@pawanpraka1 pawanpraka1 requested a review from kmova August 6, 2020 10:27
@pawanpraka1 pawanpraka1 changed the title fix(zfspv): rounding off the volume size to the Gi and Mi fix(zfspv): rounding off the volume size to Gi and Mi Aug 6, 2020
@pawanpraka1 pawanpraka1 force-pushed the roundoff branch 2 times, most recently from d7c1cf5 to 18cc7c0 Compare August 6, 2020 10:29
@codecov-commenter
Copy link

codecov-commenter commented Aug 6, 2020

Codecov Report

Merging #191 into master will decrease coverage by 12.99%.
The diff coverage is 44.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #191       +/-   ##
==========================================
- Coverage   22.88%   9.88%   -13.00%     
==========================================
  Files          14      20        +6     
  Lines         485    1163      +678     
==========================================
+ Hits          111     115        +4     
- Misses        373    1047      +674     
  Partials        1       1               
Impacted Files Coverage Δ
pkg/driver/controller.go 1.16% <44.44%> (ø)
pkg/driver/grpc.go 0.00% <0.00%> (ø)
pkg/driver/agent.go 0.00% <0.00%> (ø)
pkg/driver/scheduler.go 0.00% <0.00%> (ø)
pkg/driver/driver.go 0.00% <0.00%> (ø)
pkg/driver/identity.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd4a0de...bc5b2cd. Read the comment docs.

@pawanpraka1 pawanpraka1 force-pushed the roundoff branch 7 times, most recently from 11a6366 to 479fe46 Compare August 7, 2020 10:11
ZFS does not create the zvol if volume size is not multiple of
the volblocksize. There are use cases where customer will create
a PVC with size as 5G, which will be 5 * 1000 * 1000 * 1000 bytes
and this is not the multiple of default volblocksize 8k.

In ZFS, volblocksize and recordsize must be power of 2 from 512B to 1M,
so keeping the size in the form of Gi or Mi should be
sufficient to make volsize multiple of volblocksize/recordsize.

Signed-off-by: Pawan <pawan@mayadata.io>
Signed-off-by: Pawan <pawan@mayadata.io>
@kmova kmova merged commit b1b69eb into openebs:master Aug 7, 2020
pawanpraka1 added a commit to pawanpraka1/zfs-localpv that referenced this pull request Aug 10, 2020
ZFS does not create the zvol if volume size is not multiple of
the volblocksize. There are use cases where customer will create
a PVC with size as 5G, which will be 5 * 1000 * 1000 * 1000 bytes
and this is not the multiple of default volblocksize 8k.

In ZFS, volblocksize and recordsize must be power of 2 from 512B to 1M,
so keeping the size in the form of Gi or Mi should be
sufficient to make volsize multiple of volblocksize/recordsize.


Signed-off-by: Pawan <pawan@mayadata.io>
@pawanpraka1 pawanpraka1 deleted the roundoff branch August 10, 2020 05:59
kmova pushed a commit that referenced this pull request Aug 10, 2020
ZFS does not create the zvol if volume size is not multiple of
the volblocksize. There are use cases where customer will create
a PVC with size as 5G, which will be 5 * 1000 * 1000 * 1000 bytes
and this is not the multiple of default volblocksize 8k.

In ZFS, volblocksize and recordsize must be power of 2 from 512B to 1M,
so keeping the size in the form of Gi or Mi should be
sufficient to make volsize multiple of volblocksize/recordsize.


Signed-off-by: Pawan <pawan@mayadata.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants