DragonFly kernel List (threaded) for 2008-07
DragonFly BSD
DragonFly kernel List (threaded) for 2008-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: vfs.root.mountfrom hammer?

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 27 Jul 2008 10:48:45 -0700 (PDT)

:The following patch works perfectly:
: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.

    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,
    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?
					Matthew Dillon 

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]