mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
zdb: show dedup table and log attributes
There's interesting info in there that is going to help with understanding dedup behavior at any given moment. Since this is a format change, tests that rely on that output have been modified to match. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Closes #16755
This commit is contained in:
@@ -70,7 +70,7 @@ log_must zpool sync
|
||||
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "active"
|
||||
|
||||
# four entries in the unique table
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
|
||||
|
||||
# single containing object in the MOS
|
||||
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256 | wc -l) -eq 1
|
||||
@@ -84,7 +84,7 @@ log_must cp /$TESTPOOL/file1 /$TESTPOOL/file2
|
||||
log_must zpool sync
|
||||
|
||||
# now four entries in the duplicate table
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-duplicate: 4 entries'"
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-duplicate:.*entries=4'"
|
||||
|
||||
# now two DDT ZAPs in the container object; DDT ZAPs aren't cleaned up until
|
||||
# the entire logical table is destroyed
|
||||
|
||||
@@ -70,7 +70,7 @@ log_must zpool sync
|
||||
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "active"
|
||||
|
||||
# four entries in the unique table
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
|
||||
|
||||
# single containing object in the MOS
|
||||
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256 | wc -l) -eq 1
|
||||
@@ -107,7 +107,7 @@ log_must zpool sync
|
||||
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "active"
|
||||
|
||||
# four entries in the unique table
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
|
||||
|
||||
# single containing object in the MOS
|
||||
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256 | wc -l) -eq 1
|
||||
|
||||
@@ -63,7 +63,7 @@ log_must zpool sync
|
||||
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "disabled"
|
||||
|
||||
# should be four entries in the unique table
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
|
||||
|
||||
# should be just one DDT ZAP in the MOS
|
||||
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256-zap- | wc -l) -eq 1
|
||||
@@ -73,7 +73,7 @@ log_must cp /$TESTPOOL/file1 /$TESTPOOL/file2
|
||||
log_must zpool sync
|
||||
|
||||
# now four entries in the duplicate table
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-duplicate: 4 entries'"
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-duplicate:.*entries=4'"
|
||||
|
||||
# now two DDT ZAPs in the MOS; DDT ZAPs aren't cleaned up until the entire
|
||||
# logical table is destroyed
|
||||
|
||||
@@ -71,7 +71,7 @@ log_must dd if=/dev/urandom of=/$TESTPOOL/ds1/file1 bs=128k count=4
|
||||
log_must zpool sync
|
||||
|
||||
# should be four entries in the skein unique table
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-skein-zap-unique: 4 entries'"
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-skein-zap-unique:.*entries=4'"
|
||||
|
||||
# should be just one DDT ZAP in the MOS
|
||||
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-.*-zap- | wc -l) -eq 1
|
||||
@@ -90,7 +90,7 @@ log_must zpool sync
|
||||
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "active"
|
||||
|
||||
# now also four entries in the blake3 unique table
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-blake3-zap-unique: 4 entries'"
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-blake3-zap-unique:.*entries=4'"
|
||||
|
||||
# two entries in the MOS: the legacy skein DDT ZAP, and the containing dir for
|
||||
# the blake3 FDT table
|
||||
|
||||
@@ -71,7 +71,7 @@ log_must zpool sync
|
||||
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "disabled"
|
||||
|
||||
# should be four entries in the unique table
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
|
||||
|
||||
# should be just one DDT ZAP in the MOS
|
||||
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256-zap- | wc -l) -eq 1
|
||||
@@ -90,7 +90,7 @@ log_must zpool sync
|
||||
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "enabled"
|
||||
|
||||
# now four entries in the duplicate table
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-duplicate: 4 entries'"
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-duplicate:.*entries=4'"
|
||||
|
||||
# now two DDT ZAPs in the MOS; DDT ZAPs aren't cleaned up until the entire
|
||||
# logical table is destroyed
|
||||
@@ -117,7 +117,7 @@ log_must zpool sync
|
||||
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "active"
|
||||
|
||||
# four entries in the unique table
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
|
||||
|
||||
# single containing object in the MOS
|
||||
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256 | wc -l) -eq 1
|
||||
|
||||
@@ -63,7 +63,7 @@ log_must zpool sync
|
||||
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "disabled"
|
||||
|
||||
# should be four entries in the unique table
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
|
||||
|
||||
# should be just one DDT ZAP in the MOS
|
||||
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256-zap- | wc -l) -eq 1
|
||||
@@ -96,7 +96,7 @@ log_must zpool sync
|
||||
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "disabled"
|
||||
|
||||
# should be four entries in the unique table
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
|
||||
log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
|
||||
|
||||
# should be just one DDT ZAP in the MOS
|
||||
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256-zap- | wc -l) -eq 1
|
||||
|
||||
Reference in New Issue
Block a user