mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Increase limit of redaction list by using spill block
Currently redaction bookmarks and their associated redaction lists have a relatively low limit of 36 redaction snapshots. This is imposed by the number of snapshot GUIDs that fit in the bonus buffer of the redaction list object. While this is more than enough for most use cases, there are some limited cases where larger numbers would be useful to support. We tweak the redaction list creation code to use a spill block if the number of redaction snapshots is above the amount that would fit in the bonus buffer. We also make a small change to allow spill blocks to be use for types of data besides SA. In order to fully leverage this logic, we also change the redaction code to use vmem_alloc, to handle extremely large allocations if needed. Finally, small tweaks were made to the zfs commands and the test suite. Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Closes #15018
This commit is contained in:
@@ -86,6 +86,7 @@ typeset -a properties=(
|
||||
"feature@log_spacemap"
|
||||
"feature@device_rebuild"
|
||||
"feature@draid"
|
||||
"feature@redaction_list_spill"
|
||||
)
|
||||
|
||||
if is_linux || is_freebsd; then
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
# second (the last block in the file) is common to them all.
|
||||
# 2. Verify a redacted stream with a reasonable redaction list length can
|
||||
# be correctly processed.
|
||||
# 3. Verify that if the list is too long, the send fails gracefully.
|
||||
#
|
||||
|
||||
typeset ds_name="many_clones"
|
||||
@@ -56,13 +55,18 @@ for i in {1..64}; do
|
||||
log_must zfs snapshot ${clone}$i@snap
|
||||
done
|
||||
|
||||
# The limit isn't necessarily 32 snapshots. The maximum number of snapshots in
|
||||
# The limit isn't necessarily 64 snapshots. The maximum number of snapshots in
|
||||
# the redacted list is determined in dsl_bookmark_create_redacted_check().
|
||||
log_must zfs redact $sendfs@snap book1 $clone{1..32}@snap
|
||||
log_must zfs redact $sendfs@snap book1 $clone{1..64}@snap
|
||||
log_must eval "zfs send --redact book1 $sendfs@snap >$stream"
|
||||
log_must eval "zfs recv $recvfs <$stream"
|
||||
compare_files $sendfs $recvfs "f2" "$RANGE8"
|
||||
|
||||
log_mustnot zfs redact $sendfs@snap book2 $clone{1..64}@snap
|
||||
rls_value="$(zpool get -H -o value feature@redaction_list_spill $POOL)"
|
||||
if [ "$rls_value" = "active" ]; then
|
||||
log_note "redaction_list_spill feature active"
|
||||
else
|
||||
log_fail "redaction_list_spill feature not active"
|
||||
fi
|
||||
|
||||
log_pass "Redacted send can deal with a large redaction list."
|
||||
|
||||
Reference in New Issue
Block a user