-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more DDT tests #17049
base: master
Are you sure you want to change the base?
Add more DDT tests #17049
Conversation
Signed-off-by: Paul Dagnelie <[email protected]>
Signed-off-by: Paul Dagnelie <[email protected]>
# we set the dedup log txg interval to 1, to get a log flush every txg, | ||
# effectively disabling the log. without this it's hard to predict when and | ||
# where things appear on-disk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# we set the dedup log txg interval to 1, to get a log flush every txg, | |
# effectively disabling the log. without this it's hard to predict when and | |
# where things appear on-disk | |
# We set the dedup log txg interval to 1, to get a log flush every txg, | |
# effectively disabling the log. Without this it's hard to predict when the | |
# entries appear in DDT ZAP |
And the same in the other test.
|
||
log_must zpool create -f -o feature@block_cloning=disabled $TESTPOOL $DISKS | ||
|
||
log_must zfs create -o recordsize=512 -o xattr=sa -o dedup=on $TESTPOOL/$TESTFS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we care about xattr=sa
here?
|
||
log_must truncate -s 128k $mountpoint/f2 | ||
sync_pool $TESTPOOL | ||
sleep 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this sleep 1
?
log_onexit cleanup | ||
|
||
log_must create_pool $TESTPOOL $DISKS | ||
log_must zfs create -o dedup=on -o recordsize=512 $TESTPOOL/$TESTFS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log_must zfs create -o dedup=on -o recordsize=512 $TESTPOOL/$TESTFS | |
log_must zfs create -o dedup=sha256 -o recordsize=512 $TESTPOOL/$TESTFS |
It seems below you depend on the algorithm.
nleafs=$(zdb -dddd $TESTPOOL "$zap_obj" | grep "Leaf blocks:" | awk -F\: '{print($2);}') | ||
log_must test $nleafs -lt $nleafs_old | ||
|
||
log_pass "ZAP object shrank after rmeoving entries." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log_pass "ZAP object shrank after rmeoving entries." | |
log_pass "ZAP object shrank after removing entries." |
And please squash the commits and write some commit message. |
Motivation and Context
The new Fast Dedup feature has a lot of moving parts, and only some of them have tests. We have some tests for prefetch and quota, and a generic ZAP shrinking test, but we don't have anything for the pruning command or specific to DDT zap shrinking. We also don't have anything for the dedup log, but I added a test for that in #17038 .
Description
We add a couple small new tests for
zpool ddtprune
and DDT-specific ZAP shrinking.How Has This Been Tested?
Ran the ZTS with the new tests, they passed
Types of changes
Checklist:
Signed-off-by
.