Anish Mistry wrote:
On Sunday 22 June 2008, Dominic Fandrey wrote:
I know these are desperate mesures, but the problem that fusefs
doesn't write everything back to the disk before a shutdown is
completed remains, because the rc script is often shot down by
the shutdown watchdog.

Hence I have extended my workaround to force stop the watchdog
until everything is written to the media.

Regards,
Dominic

diff -Pur ports/sysutils/fusefs-kmod.orig/files/fusefs.in
ports/sysutils/fusefs-kmod/files/fusefs.in ---
ports/sysutils/fusefs-kmod.orig/files/fusefs.in 2008-06-22
21:35:27.000000000 +0200 +++
ports/sysutils/fusefs-kmod/files/fusefs.in      2008-06-22
21:44:34.000000000 +0200 @@ -50,9 +50,18 @@
                        ;;
                esac
        done
+
+       # This is an evil yet necessary hack to give fuse the time to
+       # write all data to the media before the system is shut down.
+       if [ -n "$rcshutdown_timeout" -a -n "$_rcshutdown_watchdog" ]; then
+               /bin/kill -STOP "$_rcshutdown_watchdog"
+       fi
        until kldunload $kmod; do
                /bin/sleep 0.25
        done
+       if [ -n "$rcshutdown_timeout" -a -n "$_rcshutdown_watchdog" ]; then
+               /bin/kill -CONT "$_rcshutdown_watchdog"
+       fi
 }
 load_rc_config $name
Please open a PR, this is out of my comfort zone by doing "evil" stuff during shutdown. It would probably be helpful to bring up this on hackers/current by showing your patch. Hopefully we can get some attention and get the necessary changes in the base/kernel to do this "right". It does look like there is a solution in Csaba's development version. Did you take a look at Csaba's message on hackers at the beginning of January?


Thanks for the pointer. Unfortunately it seems that Csaba's patch only
allows you to stall shutdown for 10 seconds. After heavy writing
more than a minute can be necessary to prevent data loss.

I have created a problem report: ports/124901
http://www.freebsd.org/cgi/query-pr.cgi?pr=124901

I hope this will make it. To me data loss and file system corruption
are the worst case scenario and to me it's worth stalling shutdown
for as long as it takes to write the data.

Regards,
Dominic
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to