Received: with ECARTIS (v1.0.0; list xfs); Tue, 05 Aug 2008 00:38:44 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.0-r574664 (2007-09-11) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-r574664 Received: from cuda.sgi.com (cuda1.sgi.com [192.48.168.28]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m757cO22013889 for ; Tue, 5 Aug 2008 00:38:24 -0700 X-ASG-Debug-ID: 1217921978-591902900000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from ipmail04.adl2.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 563B11246DB8 for ; Tue, 5 Aug 2008 00:39:38 -0700 (PDT) Received: from ipmail04.adl2.internode.on.net (ipmail04.adl2.internode.on.net [203.16.214.57]) by cuda.sgi.com with ESMTP id ZbgDJJKgTugaTSgH for ; Tue, 05 Aug 2008 00:39:38 -0700 (PDT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUMAN+dl0h5LAiFXWdsb2JhbACKc4Y7Hpxn X-IronPort-AV: E=Sophos;i="4.31,309,1215354600"; d="scan'208";a="174562178" Received: from ppp121-44-8-133.lns10.syd7.internode.on.net (HELO disturbed) ([121.44.8.133]) by ipmail04.adl2.internode.on.net with ESMTP; 05 Aug 2008 17:09:37 +0930 Received: from dave by disturbed with local (Exim 4.69) (envelope-from ) id 1KQH8r-0001Y4-AH; Tue, 05 Aug 2008 17:39:37 +1000 Date: Tue, 5 Aug 2008 17:39:37 +1000 From: Dave Chinner To: Lachlan McIlroy Cc: xfs-oss , xfs-dev X-ASG-Orig-Subj: Re: [PATCH] Use KM_NOFS for debug trace buffers Subject: Re: [PATCH] Use KM_NOFS for debug trace buffers Message-ID: <20080805073937.GC21635@disturbed> Mail-Followup-To: Lachlan McIlroy , xfs-oss , xfs-dev References: <4897FCC7.400@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4897FCC7.400@sgi.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: ipmail04.adl2.internode.on.net[203.16.214.57] X-Barracuda-Start-Time: 1217921979 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.1805 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV 0.91.2/6021/Wed Feb 27 15:55:48 2008 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 17388 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: david@fromorbit.com Precedence: bulk X-list: xfs On Tue, Aug 05, 2008 at 05:09:59PM +1000, Lachlan McIlroy wrote: > Use KM_NOFS to prevent recursion back into the filesystem which can > cause deadlocks. > > In the case of xfs_iread() we hold the lock on the inode cluster buffer > while allocating memory for the trace buffers. If we recurse back into > XFS to flush data that may require a transaction to allocate extents > which needs log space. This can deadlock with the xfsaild thread which > can't push the tail of the log because it is trying to get the inode > cluster buffer lock. Looks OK. Cheers, Dave. -- Dave Chinner david@fromorbit.com