Giving up on x buffers - losing files
Arjan van Leeuwen
avleeuwen at piwebs.com
Wed Jun 30 02:55:45 PDT 2004
On Tue, 29 Jun 2004 03:29:59 -0700 (PDT), Don Lewis <truckman at FreeBSD.org>
> On 26 Jun, Don Lewis wrote:
>> On 26 Jun, Arjan van Leeuwen wrote:
> 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
> 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.
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 :).
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
More information about the freebsd-current