mirror_zfs/lib/libzfs
Mike Gerdts f3f46b0e45 OpenZFS 9318 - vol_volsize_to_reservation does not account for raidz skip blocks
When a volume is created in a pool with raidz vdevs and
volblocksize != 128k, the volume can reference more space than is
reserved with the automatically calculated refreservation.  There
are two deficiencies in vol_volsize_to_reservation that contribute
to this:

  1) Skip blocks may be added to keep each allocation a multiple
     of parity + 1. This is the dominating factor when volblocksize
     is close to 2^ashift.

  2) raidz deflation for 128 KB blocks is different for most other
     block sizes.

See "The theory of raidz space accounting" comment in
libzfs_dataset.c for a full explanation.

Authored by: Mike Gerdts <mike.gerdts@joyent.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Kody Kantor <kody.kantor@joyent.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Dan McDonald <danmcd@joyent.com>
Ported-by: Mike Gerdts <mike.gerdts@joyent.com>

Porting Notes:
* ZTS: wait for zvols to exist before writing
* ZTS: use log_must_busy with {zpool|zfs} destroy

OpenZFS-issue: https://www.illumos.org/issues/9318
OpenZFS-commit: https://github.com/illumos/illumos-gate/commit/b73ccab0
Closes #8973
2020-01-22 13:48:56 -08:00
..
.gitignore Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_changelist.c zfs_handle used after being closed/freed in change_one callback 2019-09-25 11:27:51 -07:00
libzfs_config.c OpenZFS 4521 - zfstest is trying to execute evil "zfs unmount -a" 2017-02-03 13:24:44 -08:00
libzfs_core.pc.in Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_crypto.c Allow unencrypted children of encrypted datasets 2019-09-25 11:27:48 -07:00
libzfs_dataset.c OpenZFS 9318 - vol_volsize_to_reservation does not account for raidz skip blocks 2020-01-22 13:48:56 -08:00
libzfs_diff.c Fix wrong assertion in libzfs diff error handling 2019-05-19 17:31:54 -07:00
libzfs_import.c Improve zpool labelclear 2019-03-21 10:13:01 -07:00
libzfs_iter.c Detect and prevent mixed raw and non-raw sends 2019-03-13 11:00:43 -07:00
libzfs_mount.c Fix race in parallel mount's thread dispatching algorithm 2019-09-25 11:27:49 -07:00
libzfs_pool.c Add feature check for 'zpool resilver' command 2019-05-02 16:42:31 -07:00
libzfs_sendrecv.c Always refuse receving non-resume stream when resume state exists 2019-09-25 11:27:51 -07:00
libzfs_status.c Add missing MMP status code to libzfs_status 2019-01-03 12:15:46 -08:00
libzfs_util.c Increase default zcmd allocation to 256K 2019-09-25 11:27:50 -07:00
libzfs.pc.in Add libnvpair to libzfs pkg-config 2019-09-25 11:27:48 -07:00
Makefile.am Include third party licenses in dist tarballs 2019-01-08 09:29:34 -08:00
THIRDPARTYLICENSE.openssl Encryption patch follow-up 2017-10-11 16:54:48 -04:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00