Add flush command option to sync.sh , to attempt to flush qemu-nbd state and attempt basic repair of filesystem

This commit is contained in:
GutPuncher 2024-08-26 02:01:43 -04:00
parent d1380b57f1
commit 4e77bf1c0a
No known key found for this signature in database
GPG key ID: 38CE0A7B6841D1C7

View file

@ -74,6 +74,12 @@ else
sudo modprobe nbd
[ ! -d $TMPMOUNT ] && mkdir $TMPMOUNT
case $1 in
flush)
mount_vdisk
sudo blockdev --flushbufs /dev/nbd0
sudo dosfsck -w -r -l -v -t /dev/nbd0
umount_vdisk
;;
diff)
mount_vdisk
diff -x *.MAP --color=always -r ../src/ $TMPMOUNT/ | less -R -p "diff -x.*|Only in.*"