From: Phillip Lougher Subject: Re: A patch for squashfs on s390 Date: Mon, 04 Sep 2006 01:54:33 +0100 Message-ID: <44FB7949.4010306@lougher.demon.co.uk> References: <20060902204753.84b354a2.zaitcev@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: phillip@lougher.org.uk, linux-fsdevel@vger.kernel.org, heiko.carstens@de.ibm.com, phillip.lougher@gmail.com Return-path: Received: from anchor-post-32.mail.demon.net ([194.217.242.90]:10769 "EHLO anchor-post-32.mail.demon.net") by vger.kernel.org with ESMTP id S932183AbWIDAyi (ORCPT ); Sun, 3 Sep 2006 20:54:38 -0400 To: Pete Zaitcev In-Reply-To: <20060902204753.84b354a2.zaitcev@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Pete Zaitcev wrote: > > At some situations, this can get called twice on the same page. > When this happens first, the page is filled normally, and SetPageUptodate > clears dirty bit. Notice though, SetPageUptodate is different on s390 > from all other architectures, because the dirty bit belongs to a page, > and not to a page table entry there. So, on second pass, SetPageUptodate > sees the page already up to date and does not clear the dirty bit. > This creates a dirty page which eventually oopses us. Makes sense. I hit the "same page read more than once at the same time" race condition a couple of years ago, and solved it using grab_cache_page_nowait. Unfortunately I didn't know about the s390, however, I probably should always have had a PageUptodate check anyway. > > Here's a patch which I made out of Heiko's patch by transforming it: > > Any objections? None from me. > > -- Pete > > P.S. When is squashfs going to be upstream? > I'd like Squashfs to be in the mainline kernel. As you may know, I submitted Squashfs in March 2005. I ended up with a lot of necessary improvements (larger than 4GB filesystems etc.), and spent over a year implementing them. These were released as Squashfs 3.0. I could re-submit Squashfs now, however, from my last failed attempt I know it could require a lot of effort to get it accepted, and I'm waiting until I have the necessary spare time. A rushed or poor re-submission is going to be worse than none at all, and I don't want to fail a second time... Regards Phillip -- VGER BF report: U 0.504827