From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 23 Oct 2008 12:21:00 +0200 From: Nick Piggin Subject: Re: [patch] fs: improved handling of page and buffer IO errors Message-ID: <20081023102100.GA23694@wotan.suse.de> References: <20081021112137.GB12329@wotan.suse.de> <20081021125915.GA26697@fogou.chygwyn.com> <20081022222316.GI15154@wotan.suse.de> <20081023095949.GB6640@fogou.chygwyn.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081023095949.GB6640@fogou.chygwyn.com> Sender: owner-linux-mm@kvack.org Return-Path: To: steve@chygwyn.com Cc: Mark Fasheh , Miklos Szeredi , akpm@linux-foundation.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org List-ID: On Thu, Oct 23, 2008 at 10:59:49AM +0100, steve@chygwyn.com wrote: > > Btw, at least for the readpage case, a return of AOP_TRUNCATED_PAGE should > > be checked for, which would indicate (along with !PageUptodate()) whether we > > need to retry the read. page_mkwrite though, as you point out, is a > > different story. > > --Mark > > > Yes, and although I probably didn't make it clear I was thinking > specifically of the page fault path there where both readpage and > page_mkwrite hang out. > > Also, I've looked through all the current GFS2 code and it seems to > be correct in relation to Miklos' point on PageUptodate() vs > page->mapping == NULL so I don't think any changes are required there, > but obviously that needs to be taken into account in filemap_fault wrt > to retrying in the lock demotion case. In other words we should be > testing for page->mapping == NULL rather than !PageUptodate() in that > case, PageUptodate is OK for the filemap_fault check AFAIKS, because it does a find_lock_page and runs the check under lock (so it can't be truncated or invalidated), in order to prevent fault vs truncate / invalidate races. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org