svn commit: r254992 - head/etc/rc.d

John-Mark Gurney jmg at funkthat.com
Wed Aug 28 16:36:57 UTC 2013


Gavin Atkinson wrote this message on Wed, Aug 28, 2013 at 15:12 +0000:
> Author: gavin
> Date: Wed Aug 28 15:12:15 2013
> New Revision: 254992
> URL: http://svnweb.freebsd.org/changeset/base/254992
> 
> Log:
>   After writing a kernel core dump into /var/crash, call sync(8).
>   
>   If we panic again shortly after boot (say, within 30 seconds), any core
>   dump we wrote out may be lost on reboot.  In this situation, we really
>   want to keep that core file, as it may be the only way to have the issue
>   resolved.  Call sync(8) after writing out the core file and running
>   crashinfo(8), in the hope that these will not be lost if we panic
>   again.  sync(8) is only called in the case where there is a core dump
>   to be written out, so won't be called during normal boots.

Why don't you call fsync on the relevant file(s) (or all the files in the
crash dir)?  sync just starts the process while fsync will block till
all the blocks are on disk...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the svn-src-all mailing list