git: DragonFly_RELEASE_2_10 fq - fix a (possible) deadlock

Alex Hornung alexh at
Sat Aug 27 01:37:45 PDT 2011

commit 155f07c71cbd995755053da0377522f7bad3d6a2
Author: Alex Hornung <ahornung at>
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(-)

DragonFly BSD source repository

More information about the Commits mailing list