Issue #2768 has been updated by shamaz.

Hello.

I took the second look at the code and found that VPFSROOT is only used in 
mount and mountctl system calls (see src/sys/kern/vfs_syscalls.c), so I believe 
setting this flag on mountpoint of a slave PFS or any other "historical" mount 
will not hurt anything (like that VFS cache). NFS is also working fine with my 
patch applied.

I understand that comment in hammer_inode.c (namely this: "Only mark as the 
root vnode if the ip is not historical, otherwise the VFS cache will get 
confused.") in the following way:

If we do mount like this: # mount -t null /@@0x%016lx:00000 
/historical-pfs0-mountpoint do NOT set VROOT flag or vfs cache will get 
confused.
If we do mounts like these: # mount -t null /@@-1:00000 /current-pfs0 or # 
mount -t hammer /dev/serno/XXXXX /hammer-mountpoint SET VROOT flag.

So it is irrelevant to VPFSROOT and we can safely set it if ip->obj_id == 
HAMMER_OBJID_ROOT even if ip->obj_asof != hmp->asof

Is my guess right? Can you make any tests to be sure that I did not break 
anything? I think I need some help here.

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

* Author: shamaz
* Status: In Progress
* 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 (398 Bytes)
hammer_inode.c.patch (685 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