[PATCH] Fix hang caused by race waking commit threads (2 of 3)
[email protected] (Dave Kleikamp) Wed, 23 Mar 2005 16:59:44 -0600 (CST)
| Newsgroups | gmane.comp.file-systems.jfs.patches |
|---|---|
| Message-ID | <[email protected]> |
# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/03/16 15:43:34-06:00 [email protected] # JFS: Fix hang caused by race waking commit threads # # The flag, jfs_commit_threads_waking, is meant to avoid waking up too # many jfs_commit threads when only one is needed. There is a # possibility that all the threads will be running, and the flag gets # set, but never reset. The fix is to make sure the flag is reset # before a thread sleeps. # # Signed-off-by: Dave Kleikamp <[email protected]> # diff -Nru a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c --- a/fs/jfs/jfs_txnmgr.c 2005-03-23 16:57:05 -06:00 +++ b/fs/jfs/jfs_txnmgr.c 2005-03-23 16:57:05 -06:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) International Business Machines Corp., 2000-2004 + * Copyright (C) International Business Machines Corp., 2000-2005 * Portions Copyright (C) Christoph Hellwig, 2001-2002 * * This program is free software; you can redistribute it and/or modify @@ -2796,6 +2796,8 @@ if (!WorkDone) break; } + /* In case a wakeup came while all threads were active */ + jfs_commit_thread_waking = 0; if (current->flags & PF_FREEZE) { LAZY_UNLOCK(flags); ------------------------------------------------------- This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005 Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click