From: =?iso-8859-1?Q?J=F6rn?= Engel Subject: Re: Writing out a (file) mmapped page Date: Mon, 13 Jun 2005 08:57:57 +0200 Message-ID: <20050613065757.GA26966@wohnheim.fh-wedel.de> References: <8e70aacf050612094916d32276@mail.gmail.com> <2cd57c900506121932600e4db1@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Martin Jambor , linux-fsdevel@vger.kernel.org Return-path: Received: from mail.fh-wedel.de ([213.39.232.198]:7600 "EHLO moskovskaya.fh-wedel.de") by vger.kernel.org with ESMTP id S261377AbVFMG6A (ORCPT ); Mon, 13 Jun 2005 02:58:00 -0400 To: Coywolf Qi Hunt Content-Disposition: inline In-Reply-To: <2cd57c900506121932600e4db1@mail.gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, 13 June 2005 10:32:50 +0800, Coywolf Qi Hunt wrote: > On 6/13/05, Martin Jambor wrote: > >=20 > > I have spent a few hours trying to find out how dirty mmapped pages > > are written out in filesystems using the "generic" functions but so > > far I have not been successful. The main thing that escapes me is t= he > > following: > >=20 > > block_write_full_page() writes out only buffers marked dirty or who= le > > page when there are no buffers associated with it. Where in kernel = are > > buffers either marked dirty or stripped off a mmaped page when the > > page itself becomes dirty? I would be very grateful for a pointer = to > > the source, possibly accompanied by a brief explanation of how it g= ets > > called. > >=20 > > One comment in buffer.c suggests aops->prepare_write is called by a > > pagefault handler for mmaped pages but I found no such call (using > > cscope). >=20 > generic_file_buffered_write() calls a_ops->prepare_write(). That's the write path, not mmap. writepage() is your friend. J=F6rn --=20 Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html