kernel - Fix NFS panic when competing clients collide on hardlink
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 21 Nov 2012 17:59:55 +0000 (09:59 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 21 Nov 2012 17:59:55 +0000 (09:59 -0800)
commitc9682b51ed835746abe665420259c9d73cb06bfd
tree3f2ba7e1bec6883a7d90d23f0832981e8033cb0d
parent3598cc148acd8b5b528ae01060c3f974e6692bfc
kernel - Fix NFS panic when competing clients collide on hardlink

* Fix recursive execlusive lock on vnode.

* For example, if several boxes are nfs booting and have the same writable
  /var/log, simultanious attempts to rotate logs can cause a panic due to
  higher layers of the OS's hardlink code not being able to detect
  duplicate vnodes which are created by some other client racing the same
  operation.

* Adds CNP_NOTVP and cn_notvp flag which vop_compat_nlink() uses to notify
  NFS's VOP_LOOKUP function to check for a vnode lookup collision.

-Matt
sys/kern/vfs_default.c
sys/sys/namei.h
sys/vfs/nfs/nfs_node.c
sys/vfs/nfs/nfs_vfsops.c
sys/vfs/nfs/nfs_vnops.c
sys/vfs/nfs/nfsm_subs.c
sys/vfs/nfs/nfsnode.h