zfs_create: round up volume size to multiple of bs

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 #8541 
Closes #10196
This commit is contained in:
alex
2020-04-25 10:04:34 +08:00
committed by GitHub
parent aa646323db
commit 47c9299fcc
4 changed files with 46 additions and 4 deletions
+1 -2
View File
@@ -143,8 +143,7 @@ The size represents the logical size as exported by the device.
By default, a reservation of equal size is created.
.Pp
.Ar size
is automatically rounded up to the nearest 128 Kbytes to ensure that the volume
has an integral number of blocks regardless of
is automatically rounded up to the nearest multiple of the
.Sy blocksize .
.Bl -tag -width "-b"
.It Fl b Ar blocksize