-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[WIP] zfs_create: round up volume size to multiple of bs #10196
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10196 +/- ##
==========================================
- Coverage 79.33% 79.17% -0.17%
==========================================
Files 389 389
Lines 123038 123046 +8
==========================================
- Hits 97611 97419 -192
- Misses 25427 25627 +200
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just two small nits, thank you for taking the time to tackle this issue. Please rebase this on master after addressing the comments.
tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_002_pos.ksh
Outdated
Show resolved
Hide resolved
Round up the volume size requested in `zfs create -V size` to the next higher multiple of the volblocksize. Updates the man page and adds a test to verify the new behavior. Reported-by: puffi <puffi@users.noreply.github.com> Signed-off-by: Alex John <alex@stty.io>
Round up the volume size requested in `zfs create -V size` to the next higher multiple of the volblocksize. Updates the man page and adds a test to verify the new behavior. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reported-by: puffi <puffi@users.noreply.github.com> Signed-off-by: Alex John <alex@stty.io> Closes openzfs#8541 Closes openzfs#10196 (cherry picked from commit 47c9299)
Round up the volume size requested in `zfs create -V size` to the next higher multiple of the volblocksize. Updates the man page and adds a test to verify the new behavior. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reported-by: puffi <puffi@users.noreply.github.com> Signed-off-by: Alex John <alex@stty.io> Closes openzfs#8541 Closes openzfs#10196
Round up the volume size requested in
zfs create -V size
to the nexthigher multiple of the volblocksize. Updates the man page and adds a
test to verify the new behavior.
Reported-by: puffi puffi@users.noreply.github.com
Signed-off-by: Alex John alex@stty.io
Motivation and Context
Fixes #8541
Description
Adds a check in zfs_main after all the arguments have been parsed to check if its a volume. Then we check if the user has specified a blocksize, if not, set it to default and check if the volsize is a multiple of. If not, round it up using the
P2ROUNDUP_TYPED
macro and set the new volsize in the nvlist.Documentation has been updated to reflect the above and a naive test added (which can be improved).
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.