DragonFly BSD
DragonFly commits List (threaded) for 2011-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: fq - fix a (possible) deadlock


From: Alex Hornung <alexh@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 27 Aug 2011 01:36:07 -0700 (PDT)

commit 009da86a5800b6fefcda0a946ab02a089bd9254f
Author: Alex Hornung <ahornung@gmail.com>
Date:   Fri Aug 26 00:29:17 2011 +0000

    fq - fix a (possible) deadlock
    
     * A deadlock can occur if a lock is held around the strategy call when
       the completion is synchronous and ends up in the destruction of a
       tdio, as both will acquire the same diskctx lock.
    
     * Refactor the code around strategy calls so that the bios are first
       prepared, under the protection of the lock, and inserted into a local
       array. Once that is ready and the bios are ready and taken out of
       their respective queues, the locks are dropped and the strategy call
       occurs locklessly.
    
    Reported-by: Antonio Huete (tuxillo@)

Summary of changes:
 sys/kern/dsched/fq/fq.h         |    7 +++++++
 sys/kern/dsched/fq/fq_core.c    |   39 +++++++++++++++++++++++++++++++++++----
 sys/kern/dsched/fq/fq_diskops.c |   25 +++++++++++++++++++++++--
 3 files changed, 65 insertions(+), 6 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/009da86a5800b6fefcda0a946ab02a089bd9254f


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]