Re: Giving up on x buffers - losing files

From: Arjan van Leeuwen <avleeuwen_at_piwebs.com>
Date: Wed, 30 Jun 2004 11:55:37 +0200
On Tue, 29 Jun 2004 03:29:59 -0700 (PDT), Don Lewis <truckman_at_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/
Received on Wed Jun 30 2004 - 07:55:45 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:59 UTC