git: kernel - Fix NFS panic when competing clients collide on hardlink

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Nov 21 10:03:09 PST 2012


commit c9682b51ed835746abe665420259c9d73cb06bfd
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Nov 21 09:59:55 2012 -0800

    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

Summary of changes:
 sys/kern/vfs_default.c   |    9 ++++++++-
 sys/sys/namei.h          |    3 ++-
 sys/vfs/nfs/nfs_node.c   |   18 ++++++++++++++++--
 sys/vfs/nfs/nfs_vfsops.c |    8 ++++----
 sys/vfs/nfs/nfs_vnops.c  |   16 ++++++++++------
 sys/vfs/nfs/nfsm_subs.c  |    2 +-
 sys/vfs/nfs/nfsnode.h    |    6 ++++--
 7 files changed, 45 insertions(+), 17 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c9682b51ed835746abe665420259c9d73cb06bfd


-- 
DragonFly BSD source repository


More information about the Commits mailing list