git: dmsg - Stabilization work

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Mar 2 22:32:00 PST 2015


commit a06d536b271ede1f577aaea9cbc372a2fc2a096e
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Mar 2 22:21:23 2015 -0800

    dmsg - Stabilization work
    
    * Add a refs field to dmsg_state and kdmsg_state for retention and
      disposal.
    
    * Separate out the tracking of state->subq and the state RB trees.
    
    * Greatly simplify the iocom shutdown code and functions related
      to handling communications failures.  When iterating states for
      shutdown, which requires simulating a received failure message,
      we can now simply iterate via state->subq.
    
    * Greatly simplify how the simulated failures are generated and
      handled (See dmsg_msg_simulate_failure()).  This is probably the
      most complex part of the library.
    
    * Fix a memory leak in kern_dmsg.c.
    
    * Replace xdisk's per-softc token with a lockmgr lock.  Atomicy
      has to be guaranteed across blocking conditions in certain cases
      and it was easier to simply use a lock for everything.
    
      Cleanup the locking.
    
    * Ripout the shutdown check in the I/O path, which can deadlock
      the disk management threads.  This will need to be revisited
      as it means that /dev/xa* and /dev/serno* devices remain in
      /dev after a link failure even when there are no opens on the
      device.
    
    * Add the B_FAILONDIS flag to struct buf.  This flag allows the disk
      probe code to tell xdisk that it is ok for the I/O to fail, allowing
      xdisk to discard I/Os that would otherwise block or deadlock the
      disk probe code when the related network connection is lost.

Summary of changes:
 lib/libdmsg/dmsg.h          |   3 +-
 lib/libdmsg/msg.c           | 135 ++++++++--------
 sys/dev/disk/xdisk/xdisk.c  | 264 +++++++++++++++++++------------
 sys/kern/kern_dmsg.c        | 374 ++++++++++++++++++++++++++++++--------------
 sys/kern/subr_diskgpt.c     |   2 +
 sys/kern/subr_disklabel32.c |   2 +
 sys/kern/subr_disklabel64.c |   2 +
 sys/kern/subr_diskmbr.c     |   2 +
 sys/sys/buf.h               |   2 +-
 sys/sys/dmsg.h              |   9 +-
 10 files changed, 517 insertions(+), 278 deletions(-)

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


-- 
DragonFly BSD source repository


More information about the Commits mailing list