Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jun 2004 11:55:37 +0200
From:      "Arjan van Leeuwen" <avleeuwen@piwebs.com>
To:        "Don Lewis" <truckman@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Giving up on x buffers - losing files
Message-ID:  <opsaei6zuo3qdyu1@localhost>
In-Reply-To: <200406291030.i5TATxoM069816@gw.catspoiler.org>
References:  <200406291030.i5TATxoM069816@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 29 Jun 2004 03:29:59 -0700 (PDT), Don Lewis <truckman@FreeBSD.org>  
wrote:

> On 26 Jun, Don Lewis wrote:
>> On 26 Jun, Arjan van Leeuwen wrote:
<snip>
>
> I managed to get motivated and crank out the patch below.  I'm still not
> sure why the sync command seems to prevent the problem, but the sync
> code in boot() seems to be unable to flush the buffers to disk.
>
> The way this patch works is that the syncer kernel thread is not
> immediately terminated at kernel shutdown time.  Instead, the syncer
> thread is told to speed up and run through its work queue a few times
> before terminating.
>
> One minor issue that I noticed but haven't yet figured out is that even
> after the only items remaining on the syncer work list are the syncer
> vnodes for each of the mount points, something is occasionally putting
> the disk device vnode back on the work list.  I suspect that when the
> file system is getting synced, it is dirtying the superblock or summary
> info.
>
> With this patch, the syncer takes noticeably longer to shut down, but
> the final sync done by boot() finishes either immediately or within two
> iterations, even after running mergemaster.
>
<snip patch>

Yes, this works for me too. Is there any chance that this can be  
committed? It may slow down shutdown a bit, but if I have to choose  
between that and losing (important) files, you can give me a longer  
shutdown any time :).

Arjan

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?opsaei6zuo3qdyu1>