DragonFly kernel List (threaded) for 2008-07
Re: vfs.root.mountfrom hammer?
Matthew Dillon schrieb:
:The following patch works perfectly:I conditionalized that until I tried to reduce the patch as much as
possible. I noticed that the copyin just works fine, so
: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).
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 removed the condition :)
It looks like you should be able to get rid of that static bufferI don't think that works because f_mntfromname contains e.g. "ad4s1d"
and I think to lookup the device we
and just make the volume array point directly to mnt_stat.f_mntfromname,
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
Yeah, it works perfectly. Strange ;-)
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 :-)
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 ;-)