From: Matthew Dillon Date: Sat, 10 May 2008 20:07:14 +0000 (+0000) Subject: HAMMER 42C/Many: Stabilization. X-Git-Tag: v2.0.1~670 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/bdacd2ee899343bc93b24439029960af7f99fb9e HAMMER 42C/Many: Stabilization. * Fix a deadlock. Do not flush synchronously while holding a cursor (this time in the prune code). --- diff --git a/sys/vfs/hammer/hammer_ioctl.c b/sys/vfs/hammer/hammer_ioctl.c index 595f0fd161..3d4c082603 100644 --- a/sys/vfs/hammer/hammer_ioctl.c +++ b/sys/vfs/hammer/hammer_ioctl.c @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/vfs/hammer/hammer_ioctl.c,v 1.12 2008/05/05 20:34:47 dillon Exp $ + * $DragonFly: src/sys/vfs/hammer/hammer_ioctl.c,v 1.13 2008/05/10 20:07:14 dillon Exp $ */ #include "hammer.h" @@ -191,10 +191,13 @@ retry: /* * Bad hack for now, don't blow out the kernel's buffer - * cache. + * cache. NOTE: We still hold locks on the cursor, we + * cannot call the flusher synchronously. */ - if (trans->hmp->locked_dirty_count > hammer_limit_dirtybufs) - hammer_flusher_sync(trans->hmp); + if (trans->hmp->locked_dirty_count > hammer_limit_dirtybufs) { + hammer_flusher_async(trans->hmp); + tsleep(trans, 0, "hmrslo", hz / 10); + } error = hammer_signal_check(trans->hmp); if (error == 0) error = hammer_btree_iterate_reverse(&cursor);