mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Illumos 4951 - ZFS administrative commands (fix)
4951 ZFS administrative commands should use reserved space, not fail with ENOSPC Approved by: Christopher Siden <christopher.siden@delphix.com> References: https://www.illumos.org/issues/4951 https://github.com/illumos/illumos-gate/commit/c39f2c8 Ported by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
committed by
Brian Behlendorf
parent
3d45fdd6c0
commit
0c60cc326b
@@ -612,17 +612,12 @@ dsl_pool_adjustedsize(dsl_pool_t *dp, boolean_t netfree)
|
||||
uint64_t space, resv;
|
||||
|
||||
/*
|
||||
* Reserve about 1.6% (1/64), or at least 32MB, for allocation
|
||||
* efficiency.
|
||||
* XXX The intent log is not accounted for, so it must fit
|
||||
* within this slop.
|
||||
*
|
||||
* If we're trying to assess whether it's OK to do a free,
|
||||
* cut the reservation in half to allow forward progress
|
||||
* (e.g. make it possible to rm(1) files from a full pool).
|
||||
*/
|
||||
space = spa_get_dspace(dp->dp_spa);
|
||||
resv = MAX(space >> 6, SPA_MINDEVSIZE >> 1);
|
||||
resv = spa_get_slop_space(dp->dp_spa);
|
||||
if (netfree)
|
||||
resv >>= 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user