Add upper bound for slop space calculation

This change modifies the behavior of how we determine how much slop
space to use in the pool, such that now it has an upper limit. The
default upper limit is 128G, but is configurable via a tunable.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Prakash Surya <prakash.surya@delphix.com>
Closes #11023
This commit is contained in:
Prakash Surya
2021-02-24 09:52:43 -08:00
committed by GitHub
parent 5156862960
commit f01eaed455
2 changed files with 22 additions and 14 deletions
+5 -4
View File
@@ -41,10 +41,11 @@ typedef void (dsl_sigfunc_t)(void *, dmu_tx_t *);
typedef enum zfs_space_check {
/*
* Normal space check: if there is less than 3.2% free space,
* the operation will fail. Operations which are logically
* creating things should use this (e.g. "zfs create", "zfs snapshot").
* User writes (via the ZPL / ZVOL) also fail at this point.
* Normal space check: if there is less than 3.2% free space (bounded
* by spa_max_slop), the operation will fail. Operations which are
* logically creating things should use this (e.g. "zfs create", "zfs
* snapshot"). User writes (via the ZPL / ZVOL) also fail at this
* point.
*/
ZFS_SPACE_CHECK_NORMAL,