kern_shutdown - sync_devs before looking for dumpdev
authorAlex Hornung <ahornung@gmail.com>
Sun, 21 Nov 2010 08:46:07 +0000 (08:46 +0000)
committerAlex Hornung <ahornung@gmail.com>
Sun, 21 Nov 2010 08:53:24 +0000 (08:53 +0000)
* We need to sync_devs before starting to look for dumpdev, otherwise it
  might have happened that the probing of the disk hasn't finished yet.

sys/kern/kern_shutdown.c

index d47da2a..3ecd38d 100644 (file)
@@ -632,6 +632,7 @@ dump_conf(void *dummy)
 
        path = kmalloc(MNAMELEN, M_TEMP, M_WAITOK);
        if (TUNABLE_STR_FETCH("dumpdev", path, MNAMELEN) != 0) {
+               sync_devs();
                dev = kgetdiskbyname(path);
                if (dev != NULL)
                        dumpdev = dev;