From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Kleikamp Subject: Re: [PATCH: 2.6.20-rc4-mm1] JFS: Avoid deadlock introduced by explicit I/O plugging Date: Thu, 18 Jan 2007 08:15:30 -0600 Message-ID: <1169129730.7295.10.camel@kleikamp.austin.ibm.com> References: <1169074549.10560.10.camel@kleikamp.austin.ibm.com> <20070118063019.GA31164@filer.fsl.cs.sunysb.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: fsdevel , Nick Piggin , JFS Discussion , linux-kernel , Jens Axboe Return-path: To: Josef Sipek In-Reply-To: <20070118063019.GA31164@filer.fsl.cs.sunysb.edu> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: jfs-discussion-bounces@lists.sourceforge.net Errors-To: jfs-discussion-bounces@lists.sourceforge.net List-Id: linux-fsdevel.vger.kernel.org On Thu, 2007-01-18 at 01:30 -0500, Josef Sipek wrote: > On Wed, Jan 17, 2007 at 04:55:49PM -0600, Dave Kleikamp wrote: > > /* > > * jfs_lock.h > > @@ -42,6 +43,7 @@ do { \ > > if (cond) \ > > break; \ > > unlock_cmd; \ > > + blk_replug_current_nested(); \ > > schedule(); \ > > lock_cmd; \ > > } \ > > Is {,un}lock_cmd a macro? ... They are the commands passed into this macro (as arguments) to release/take a lock. This is a home-grown wait_on_event type macro where the condition must be checked while holding a lock. And the commands passed in are themselves macros. The jfs code could probably be cleaned up a bit as far as excessive use of macros for locking, but it's been working for a few years with few problems. -- David Kleikamp IBM Linux Technology Center ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV