+# Subvolume creation used to commit the transaction used to create it, but after +# the patch "btrfs: don't commit transaction for every subvol create", that +# changed, so sync the fs to commit any open transaction. +$BTRFS_UTIL_PROG filesystem sync $SCRATCH_MNT + $BTRFS_UTIL_PROG inspect-internal dump-tree -t1 $SCRATCH_DEV \ | grep -q "256 ROOT_ITEM" || _fail "First subvol with id 256 doesn't exist"
Oh yes. Nice catch. Reviewed-by: Anand Jain <anand.jain@xxxxxxxxxx> Thanks