Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042AbXAROQ4 (ORCPT ); Thu, 18 Jan 2007 09:16:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752041AbXAROQz (ORCPT ); Thu, 18 Jan 2007 09:16:55 -0500 Received: from e2.ny.us.ibm.com ([32.97.182.142]:48493 "EHLO e2.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752039AbXAROQy (ORCPT ); Thu, 18 Jan 2007 09:16:54 -0500 Subject: Re: [PATCH: 2.6.20-rc4-mm1] JFS: Avoid deadlock introduced by explicit I/O plugging From: Dave Kleikamp To: Josef Sipek Cc: Jens Axboe , JFS Discussion , fsdevel , linux-kernel , Nick Piggin In-Reply-To: <20070118063019.GA31164@filer.fsl.cs.sunysb.edu> References: <1169074549.10560.10.camel@kleikamp.austin.ibm.com> <20070118063019.GA31164@filer.fsl.cs.sunysb.edu> Content-Type: text/plain Date: Thu, 18 Jan 2007 08:15:30 -0600 Message-Id: <1169129730.7295.10.camel@kleikamp.austin.ibm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1070 Lines: 32 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/