Issue #2768 has been updated by shamaz.

File test.c added

As tuxillo wrote in user mailing list, mountd fails to export PFS because call 
to mountctl (2) fails. Playing with vkernel I learned, that presumable all 
mountctl calls will fail if the first argument is a mountpoint of slave PFS. It 
is so because kern_mountctl in sys/kern/vfs_syscalls.c returns EINVAL in this 
condition (VPFSROOT flag is not set):

        /*
         * Must be the root of the filesystem
         */
        if ((vp->v_flag & (VROOT|VPFSROOT)) == 0) {
                vrele(vp);
                return (EINVAL);
         }

I am sending a simple test which will return 0 if invoked with mountpoint of 
master PFS and -1 if invoked with mountpoint of slave PFS (or any other 
directory which is not a mountpoint)

----------------------------------------
Bug #2768: Slave HAMMER PFSes cannot be exported via NFS
http://bugs.dragonflybsd.org/issues/2768#change-12454

* Author: shamaz
* Status: New
* Priority: Normal
* Assignee: tuxillo
* Category: Userland
* Target version: 4.2.x
----------------------------------------
The situation I already described in user mailing list: suppose you have
slave HAMMER PFS mounted at /nbackup and want to export it, so you add to
/etc/exports a line like this:

/nbackup -ro -network 192.168.10/24

When you restart mountd daemon you will get these errors in
/var/log/messages:

Jan 14 18:37:24 ressurected mountd[2279]: can't export /nbackup
Jan 14 18:37:24 ressurected mountd[2279]: bad exports list line /nbackup
-ro -network 192.168.10/24

Once PFS is upgraded to master, it can be exported fine.

---Files--------------------------------
test.c (121 Bytes)


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://bugs.dragonflybsd.org/my/account

Reply via email to