On 2022-03-25 06:00, Naohiro Aota wrote: >> >> +start_data_bg_phy=$(get_data_bg_physical) >> +start_data_bg_phy=$((data_bg_zone >> 9)) > > start_data_bg_phy=$((start_data_bg_phy >> 9)) ? > Oops. I fixed this in my test machine but forgot to put these while sending my patch. Thanks. >> + >> +size=$($BLKZONE_PROG report -o $start_data_bg_phy -l 1 $SCRATCH_DEV |\ >> + _filter_blkzone_report |\ >> + grep -Po "cap ([0x\d]+)+" | cut -d ' ' -f 2) > > The pattern should be "cap 0x[[:xdigit:]]+" as it is hexadecimal. I > missed this point before. > I will fix it up. >> +size=$((size << 9)) >> + >> reclaim_threshold=75 >> echo $reclaim_threshold > /sys/fs/btrfs/"$uuid"/bg_reclaim_threshold >> fill_percent=$((reclaim_threshold + 2)) >> rest_percent=$((90 - fill_percent)) # make sure we're not creating a new BG >> -fill_size=$((zonesize * fill_percent / 100)) >> -rest=$((zonesize * rest_percent / 100)) >> +fill_size=$((size * fill_percent / 100)) >> +rest=$((size * rest_percent / 100)) >> >> # step 1, fill FS over $fillsize >> $XFS_IO_PROG -fc "pwrite 0 $fill_size" $SCRATCH_MNT/$seq.test1 >> $seqres.full >> -- >> 2.25.1 -- Regards, Pankaj