From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Hudec Subject: Re: triggering do_writepages Date: Wed, 20 Nov 2002 14:38:50 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20021120133850.GA579@vagabond> References: <200211190659.BAA00740@www23.ureach.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: To: Kapish K Content-Disposition: inline In-Reply-To: <200211190659.BAA00740@www23.ureach.com> List-Id: linux-fsdevel.vger.kernel.org On Tue, Nov 19, 2002 at 01:59:33AM -0500, Kapish K wrote: > > Hello, > I have a ( possibly simple ) question on > how to trigger a do-writepages to get > called, for a particular filesystem, on > which I am issuing write calls. Any code > that I put into the generic_file_write code > ( around prepare_write or commit_write ) > gets triggered when a write is issues, but I > don't seem to be getting do_writepages > invoked for that filesystem ( when I check > the sb pointer for my particular filesystem ). > Am I missing something basic in here? > Any pointers will be most helpful > Thanks in advance ... i can't find any do_writepages symbol... Anyway, what is supposed to happen is, that in commit write you either start the IO (and thus the write is done), or you mark the page dirty (using set_page_dirty). Later, either when kernel needs to reuse the page (during memory allocation), or when it decides the page is dirty too long (in kflushd), it calls the writepage address_space method on the page. This method must then start the IO (and setup a callback to unlock it when IO completes and finish). If the IO completes OK, the callback should set the page clean again so kernel can reuse it. ------------------------------------------------------------------------------- Jan 'Bulb' Hudec