DragonFly-2.1.1.463.g362ec master sys/vfs/hammer hammer.h hammer_blockmap.c hammer_cursor.c hammer_io.c hammer_ondisk.c
Matthew Dillon
dillon at crater.dragonflybsd.org
Sun Jan 25 23:31:39 PST 2009
commit 362ec2dc8da3cf56732007d509fadaf1808abe5c
Author: Matthew Dillon <dillon at 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
More information about the Commits
mailing list