From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: mpage writepage question Date: Thu, 3 Feb 2005 10:52:41 -0800 Message-ID: <20050203105241.3e249338.akpm@osdl.org> References: <1107448638.3503.473.camel@dyn318077bld.beaverton.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Received: from fw.osdl.org ([65.172.181.6]:52423 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S263153AbVBCSwq (ORCPT ); Thu, 3 Feb 2005 13:52:46 -0500 To: Badari Pulavarty In-Reply-To: <1107448638.3503.473.camel@dyn318077bld.beaverton.ibm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Badari Pulavarty wrote: > > Hi Andrew, > > I was wondering why mpage_writepage() is only "static" ? Good question. > Is the expectation that, filesystems use > > .writepage == block_full_write_page > .writepages == mpage_writepages > > ? I am little confused on why we have 2 different ways to > do things ? block_full_write_page() seems to be creating > buffer heads, where as mpage_writepages() can do directly > bios. Shouldn't they be using mpage_writepage() instead of > block_full_write_page() ? I have a feeling that we used to have a single-page writepage function in fs/mpage.c a long time ago. The current mpage_writepage() is an internal-only function and isn't suitable and should really be renamed. But it certainly looks doable. The new writepage function would need to fall back to __block_write_full_page() in many situations, but the current code in there does all that.