X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) 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-rupdated Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n1ANU0v9082914 for ; Tue, 10 Feb 2009 17:30:01 -0600 Received: from [134.14.52.238] (unknown [134.14.52.238]) by relay1.corp.sgi.com (Postfix) with ESMTP id 3A5DD8F80CE; Tue, 10 Feb 2009 15:29:20 -0800 (PST) Message-ID: <49920EC9.6060600@sgi.com> Date: Wed, 11 Feb 2009 10:33:29 +1100 From: Lachlan McIlroy Reply-To: lachlan@sgi.com Organization: SGI User-Agent: Thunderbird 2.0.0.19 (X11/20081209) MIME-Version: 1.0 To: Lachlan McIlroy , xfs-oss Subject: Re: [PATCH] Re-dirty pages on I/O error References: <4990DCF6.5000900@sgi.com> <20090210100129.GN8830@disturbed> In-Reply-To: <20090210100129.GN8830@disturbed> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Dave Chinner wrote: > On Tue, Feb 10, 2009 at 12:48:38PM +1100, Lachlan McIlroy wrote: >> [This patch seems to have slipped through the proverbial crack.] >> >> If we get an error in xfs_page_state_convert() - and it's not EAGAIN - then >> we throw away the dirty page without converting the delayed allocation. This >> leaves delayed allocations that can never be removed and confuses code that >> expects a flush of the file to clear them. We need to re-dirty the page on >> error so we can try again later or report that the flush failed. > > As discussed previously, the fix that is needed in the page > invalidation path. i.e. the page invalidate path clears the > buffer_delay() flag (via discard_buffer) before we get to > ->releasepage and so releasepage fails to convert the delalloc > extent before tossing the page.... I'll leave it up to you to implement that then Dave since I think you are the only one who understands your angle of attack. Meanwhile we have this patch running on customer systems and it's fixed the problems they were having with orphaned delayed allocations being left behind due to pages being erroneously invalidated.