linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mpage writepage question
@ 2005-02-03 16:37 Badari Pulavarty
  2005-02-03 17:10 ` Sonny Rao
  2005-02-03 18:52 ` Andrew Morton
  0 siblings, 2 replies; 3+ messages in thread
From: Badari Pulavarty @ 2005-02-03 16:37 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Andrew Morton

Hi Andrew,

I was wondering why mpage_writepage() is only "static" ?

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() ?

Thanks,
Badari


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mpage writepage question
  2005-02-03 16:37 mpage writepage question Badari Pulavarty
@ 2005-02-03 17:10 ` Sonny Rao
  2005-02-03 18:52 ` Andrew Morton
  1 sibling, 0 replies; 3+ messages in thread
From: Sonny Rao @ 2005-02-03 17:10 UTC (permalink / raw)
  To: Badari Pulavarty; +Cc: linux-fsdevel, Andrew Morton

On Thu, Feb 03, 2005 at 08:37:19AM -0800, Badari Pulavarty wrote:
> Hi Andrew,
> 
> I was wondering why mpage_writepage() is only "static" ?
> 
> 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 was wondering the same thing too.  

My only guess is that if you keep the buffer_head attached to the
page, then you don't need to call get_block again if you write the
same page back, and I suppose the fs get_block function could be
expensive and/or require I/O. 

Sonny

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mpage writepage question
  2005-02-03 16:37 mpage writepage question Badari Pulavarty
  2005-02-03 17:10 ` Sonny Rao
@ 2005-02-03 18:52 ` Andrew Morton
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2005-02-03 18:52 UTC (permalink / raw)
  To: Badari Pulavarty; +Cc: linux-fsdevel

Badari Pulavarty <pbadari@us.ibm.com> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-03 18:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-03 16:37 mpage writepage question Badari Pulavarty
2005-02-03 17:10 ` Sonny Rao
2005-02-03 18:52 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).