From 4e77bf1c0aee1bf39c17e52686a60ad6e6a4fcc3 Mon Sep 17 00:00:00 2001 From: GutPuncher Date: Mon, 26 Aug 2024 02:01:43 -0400 Subject: [PATCH] Add flush command option to sync.sh , to attempt to flush qemu-nbd state and attempt basic repair of filesystem --- build/sync.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/sync.sh b/build/sync.sh index 2491f1a6..cad1cbb9 100755 --- a/build/sync.sh +++ b/build/sync.sh @@ -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.*"