git: DragonFly_RELEASE_6_2 kernel - Change ncp->nc_generation operation

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Nov 13 16:36:34 PST 2022


commit 5fb542fcbf4c6f84034b05e4f2d932bb305641d9
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Jul 3 17:10:51 2022 -0700

    kernel - Change ncp->nc_generation operation
    
    * Change nc_generation operation.  Bit 0 is reserved.  The field is
      incremented by 2 whenever major changes are being made to the ncp
      (linking, unlinking, destruction, resolve, unresolve, vnode adjustment),
      and then incremented by 2 again when the operation is complete.
    
      The caller can test for a major gen change using:
    
      curr_gen = ncp->nc_generation & ~3;
      if ((orig_gen - curr_gen) & ~1)
          (retry needed)
    
    * Allows unlocked/relocked code to determine whether the ncp has possibly
      changed or not (will be used in upcoming commits).
    
    * Adjust the kern_rename() code to use the generation numbers.
    
    * Bit 0 will be used to check for a combination of major changes and
      lock cycling inthe future.

Summary of changes:
 sys/kern/vfs_cache.c    | 157 +++++++++++++++++++++++++++++++++++-------------
 sys/kern/vfs_syscalls.c |  11 ++--
 sys/sys/namecache.h     |  19 ++++--
 3 files changed, 137 insertions(+), 50 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5fb542fcbf4c6f84034b05e4f2d932bb305641d9


-- 
DragonFly BSD source repository


More information about the Commits mailing list