X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.4.0-r929098 Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q2OH39HA067844 for ; Sat, 24 Mar 2012 12:03:09 -0500 X-ASG-Debug-ID: 1332608583-04cb6c40f43adf10001-NocioJ Received: from bombadil.infradead.org (173-166-109-252-newengland.hfc.comcastbusiness.net [173.166.109.252]) by cuda.sgi.com with ESMTP id HshsSG5rpKVJ4XJU (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Sat, 24 Mar 2012 10:03:03 -0700 (PDT) X-Barracuda-Envelope-From: BATV+ad309bf9b63c677c6a53+3135+infradead.org+hch@bombadil.srs.infradead.org X-Barracuda-Apparent-Source-IP: 173.166.109.252 Received: from hch by bombadil.infradead.org with local (Exim 4.76 #1 (Red Hat Linux)) id 1SBUMo-0007Y7-On; Sat, 24 Mar 2012 17:03:02 +0000 Date: Sat, 24 Mar 2012 13:03:02 -0400 From: Christoph Hellwig To: Dave Chinner Cc: xfs@oss.sgi.com Subject: Re: [PATCH 2/2] xfs: avoid shutdown hang in xlog_wait() Message-ID: <20120324170302.GB21708@infradead.org> X-ASG-Orig-Subj: Re: [PATCH 2/2] xfs: avoid shutdown hang in xlog_wait() References: <1332467263-12985-1-git-send-email-david@fromorbit.com> <1332467263-12985-3-git-send-email-david@fromorbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1332467263-12985-3-git-send-email-david@fromorbit.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: 173-166-109-252-newengland.hfc.comcastbusiness.net[173.166.109.252] X-Barracuda-Start-Time: 1332608583 X-Barracuda-Encrypted: AES256-SHA X-Barracuda-URL: http://192.48.176.15:80/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-Spam-Score: 0.10 X-Barracuda-Spam-Status: No, SCORE=0.10 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1.3 tests=RDNS_DYNAMIC X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.92126 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS On Fri, Mar 23, 2012 at 12:47:43PM +1100, Dave Chinner wrote: > From: Dave Chinner > > When a shutdown is triggered from failing to find an item in the AIL > during delete, we can be called from either metadata IO completion > context or from log IO completion context. In the case of log IO > completion context, we must indicate that this is a log error so > that the forced shutdown does not attempt to flush the log. > > To flush the log whilst in log IO completion will cause a deadlock > as the shutdown won't proceed until log IO completes, and log Io > cannot complete because it has blocked waiting for itself to > complete.... > > We delete items in the AIL from log IO completion when we are > unpinning in-memory only items, or items that do not require > writeback to remove from the AIL (e.g. EFI/EFD items). Hence there > are several locations that need this treatment. Looks good. I wonder if it might be simple to simply pass a flags argument to xfs_ail_delete(_bulk) which tells which kind of shutdown to do.