vfs.root.mountfrom hammer?
Michael Neumann
mneumann at ntecs.de
Sun Jul 27 11:04:35 PDT 2008
Matthew Dillon schrieb:
:The following patch works perfectly:
:
:http://leaf.dragonflybsd.org/~mneumann/hammer-rootmount.diff
:
:It isn't possible to use more than one volume, but I think thats a minor
:problem for a hammer root mount.
:
:I'm also not quite sure where this line
:
: mp->mnt_flag &= ~MNT_RDONLY; /* mount R/W */
:..
:best belongs to. Right now it has the effect that every hammer root mount
:is read/write. I'm also not 100% sure if I did it right to create the root vnode
:(which is required in hammer_install_volume, otherwise nlookup seems to fail).
:...
: Michael
:
Normally the root mount is mounted read-only until after the
filesystem check. But with HAMMER there's a problem doing that
in that it may cause crash recovery to fail (if the dirty buffers
created from the crash recovery don't fit in kernel memory). A
read-write mount is probably needed so I think for now we have to
keep that code and force it to read-write.
There's a second problem in that I think you are still calling that
copyin() on the static volume buffer.
I conditionalized that until I tried to reduce the patch as much as
possible. I noticed that the copyin just works fine, so
I removed the condition :)
It looks like you should be able to get rid of that static buffer
and just make the volume array point directly to mnt_stat.f_mntfromname,
I don't think that works because f_mntfromname contains e.g. "ad4s1d"
and I think to lookup the device we
need a "/dev/ad4s1d". So I have to prepend a /dev/. That's why I used
the static buffer. I don't like that static buffer
either.
then conditionalize the copyins. HAMMER doesn't override the field
until after the volumes have been installed.
Your current patch is also issuing copyin()'s on the constructed kernel
buffer, which is not legal. I'm not sure why it was still able to
complete the root mount :-)
Yeah, it works perfectly. Strange ;-)
In anycase, would you like to make those fixes or should I?
I can make them and commit it. Feel free to clean up my mistakes then ;-)
Regards,
Michael
More information about the Kernel
mailing list