DragonFly commits List (threaded) for 2009-01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
DragonFly-2.1.1.463.g362ec master sys/vfs/hammer hammer.h hammer_blockmap.c hammer_cursor.c hammer_io.c hammer_ondisk.c
commit 362ec2dc8da3cf56732007d509fadaf1808abe5c
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date: Sun Jan 25 22:34:42 2009 -0800
HAMMER VFS - Reorganize the use of hammer_del_buffers(), fix rare deadlocks
The previous attempt at fixing a deadlock due to a hammer_buffer being
held cached across long-blocking procedures failed to catch all cases.
Implement a more complete and less invasive fix. These buffers are
typically held in the hammer_cursor structure.
Instead of trying to release such cached data buffers proactively,
we instead allow hammer_del_buffers() to return a temporary failure when
called from the reservation code. If hammer_del_buffers() is unable to
completely eradicate underlying buffers due to them being referenced via
the above cache entities the related hammer_reserve structure is simply
re-added to the delayed-release queue.
The related big-block are thus not reused until all such cached entites
have been dereferenced. The relaxed requirements on the cached entities
removes the possibility of a deadlock in the invalidation code and also
simplifies hammer_io_inval()'s handling of the hammer_buffer<->buffer_cache
coupling case.
Summary of changes:
sys/vfs/hammer/hammer.h | 7 +++--
sys/vfs/hammer/hammer_blockmap.c | 32 ++++++++++++++++++++---------
sys/vfs/hammer/hammer_cursor.c | 13 ------------
sys/vfs/hammer/hammer_io.c | 30 +++++++++++++++++++++------
sys/vfs/hammer/hammer_ondisk.c | 41 +++++++++++++++++++++++++++++++------
5 files changed, 83 insertions(+), 40 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/362ec2dc8da3cf56732007d509fadaf1808abe5c
--
DragonFly BSD source repository
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]