From: Shaya Potter Subject: Re: eCryptfs: Request for review Date: Fri, 21 Oct 2005 17:56:22 -0400 Message-ID: <1129931783.30717.115.camel@localhost.localdomain> References: <20051018193811.GA11545@halcrow.us> <1129736164.25733.19.camel@polarbear.fsl.cs.sunysb.edu> <1129750686.29319.7.camel@polarbear.fsl.cs.sunysb.edu> <1129757915.8716.29.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Badari Pulavarty , "Charles P. Wright" , Michael Halcrow , linux-fsdevel@vger.kernel.org Return-path: Received: from opus.cs.columbia.edu ([128.59.20.100]:55544 "EHLO opus.cs.columbia.edu") by vger.kernel.org with ESMTP id S965176AbVJUV4t (ORCPT ); Fri, 21 Oct 2005 17:56:49 -0400 To: Michael Thompson In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, 2005-10-21 at 16:44 -0500, Michael Thompson wrote: > On 10/19/05, Badari Pulavarty wrote: > > It is telling you that there is already IO in progress on that page. > > Either you ended up in __block_write_full_page() twice or called > > __block_write_full_page() before finishing up end_page_writeback(). > > OK, I have narrowed it down to the following: we are in > ecryptfs_writepage, and do the following: > lower_page = grab_cache_page(lower_inode->i_mapping, 0); > where lower_page is the page in the lower filesysetm we want to write to. > > We consistantly panic when, after we do the grab_cache_page(), we have > a locked page which is set for PageWriteback.... > PageWriteback(lower_page) != 0. > > What I would like to know is how I should proceed when I am in this > condition. I am not sure if it is acceptable to simply return from the > function, or if I need to set some flags, or wait on the lock to free > up. Unfortunately, I haven't been digging around the VFS long enough > to know what makes sense in this case. If the lower page can be in a writeback state while the upper page isn't, don't you have other problems (i.e. things writing to the lower file outside the knowledge of ecryptfs's stacked framework)?