--- src/sys/vfs/hammer/hammer_ondisk.c 2008/07/18 00:19:53 1.71 +++ src/sys/vfs/hammer/hammer_ondisk.c 2008/07/27 21:34:04 1.72 @@ -98,7 +98,8 @@ RB_GENERATE2(hammer_nod_rb_tree, hammer_ * Calls made to hammer_load_volume() or single-threaded */ int -hammer_install_volume(struct hammer_mount *hmp, const char *volname) +hammer_install_volume(struct hammer_mount *hmp, const char *volname, + struct vnode *devvp) { struct mount *mp; hammer_volume_t volume; @@ -125,12 +126,18 @@ hammer_install_volume(struct hammer_moun /* * Get the device vnode */ - error = nlookup_init(&nd, volume->vol_name, UIO_SYSSPACE, NLC_FOLLOW); - if (error == 0) - error = nlookup(&nd); - if (error == 0) - error = cache_vref(&nd.nl_nch, nd.nl_cred, &volume->devvp); - nlookup_done(&nd); + if (devvp == NULL) { + error = nlookup_init(&nd, volume->vol_name, UIO_SYSSPACE, NLC_FOLLOW); + if (error == 0) + error = nlookup(&nd); + if (error == 0) + error = cache_vref(&nd.nl_nch, nd.nl_cred, &volume->devvp); + nlookup_done(&nd); + } else { + error = 0; + volume->devvp = devvp; + } + if (error == 0) { if (vn_isdisk(volume->devvp, &error)) { error = vfs_mountedon(volume->devvp);