Created
November 22, 2023 22:12
-
-
Save tonyhutter/d69f305508ae3b7ff6e9263b22031a84 to your computer and use it in GitHub Desktop.
Revisions
-
tonyhutter created this gist
Nov 22, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ #!/bin/bash # # Run this script multiple times in parallel inside your pool's mount # to reproduce https://github.com/openzfs/zfs/issues/15526. Like: # # ./reproducer.sh & ./reproducer.sh & ./reproducer.sh & /reproducer.sh & wait # if [ $(cat /sys/module/zfs/parameters/zfs_bclone_enabled) != "1" ] ; then echo "please set /sys/module/zfs/parameters/zfs_bclone_enabled = 1" exit fi prefix="reproducer_${BASHPID}_" dd if=/dev/urandom of=${prefix}0 bs=1M count=1 status=none echo "writing files" end=1000 h=0 for i in `seq 1 2 $end` ; do let "j=$i+1" cp ${prefix}$h ${prefix}$i cp --reflink=never ${prefix}$i ${prefix}$j let "h++" done echo "checking files" for i in `seq 1 $end` ; do diff ${prefix}0 ${prefix}$i done