From mboxrd@z Thu Jan 1 00:00:00 1970 From: Coywolf Qi Hunt Subject: Re: Writing out a (file) mmapped page Date: Mon, 13 Jun 2005 10:32:50 +0800 Message-ID: <2cd57c900506121932600e4db1@mail.gmail.com> References: <8e70aacf050612094916d32276@mail.gmail.com> Reply-To: Coywolf Qi Hunt Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from nproxy.gmail.com ([64.233.182.201]:23224 "EHLO nproxy.gmail.com") by vger.kernel.org with ESMTP id S261324AbVFMCcw convert rfc822-to-8bit (ORCPT ); Sun, 12 Jun 2005 22:32:52 -0400 Received: by nproxy.gmail.com with SMTP id o25so47325nfa for ; Sun, 12 Jun 2005 19:32:51 -0700 (PDT) To: Martin Jambor In-Reply-To: <8e70aacf050612094916d32276@mail.gmail.com> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 6/13/05, Martin Jambor wrote: > Hi, > > 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 the > following: > > block_write_full_page() writes out only buffers marked dirty or whole > 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 gets > called. > > 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). generic_file_buffered_write() calls a_ops->prepare_write(). -- Coywolf Qi Hunt http://ahbl.org/~coywolf/