git: hammer2 - Change XOP feed/collect locking

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Jun 19 12:05:48 PDT 2016


commit 6d51e13ade73a84bc976316303593a37f14a3753
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Jun 19 11:59:30 2016 -0700

    hammer2 - Change XOP feed/collect locking
    
    * Change the way the backend passes chains back to the frontend.  Instead
      of requiring that the chain maintain a shared lock and bumping the lock
      count we use the new data retention feature to pass the chain back
      unlocked.
    
      This fixes a whole slew of deadlock issues related to multi-node
      synchronization.  Concurrent XOPs could previously obtain and hold
      locks on chains related to different nodes in any order, depending on
      when their related threads were scheduled.  Now that we no longer hold
      a lock in the XOP feed, the potential deadlocks should not be possible.
    
    * Add new hammer2_chain_*() API functions for manipulating the data hold
      count and remove shims that were previously used to deal with the shared
      lock hacks.
    
    * Also fix a chain->flags adjustment that wasn't atomic, fixing a tsleep()
      loop that was not breaking out.

Summary of changes:
 sys/vfs/hammer2/hammer2.h       |  7 ++++-
 sys/vfs/hammer2/hammer2_admin.c | 40 +++++++----------------
 sys/vfs/hammer2/hammer2_chain.c | 70 ++++++++++++++++++++++++++++++++++++++++-
 sys/vfs/hammer2/hammer2_inode.c |  6 ----
 sys/vfs/hammer2/hammer2_xops.c  |  6 ----
 5 files changed, 86 insertions(+), 43 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6d51e13ade73a84bc976316303593a37f14a3753


-- 
DragonFly BSD source repository



More information about the Commits mailing list