linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: Badari Pulavarty <pbadari@us.ibm.com>,
	linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [patch] fs: remove prepare_write/commit_write
Date: Thu, 25 Sep 2008 01:54:29 +0200	[thread overview]
Message-ID: <20080924235429.GA17508@wotan.suse.de> (raw)
In-Reply-To: <20080924234819.GA16344@infradead.org>

On Wed, Sep 24, 2008 at 07:48:19PM -0400, Christoph Hellwig wrote:
> On Thu, Sep 25, 2008 at 01:41:16AM +0200, Nick Piggin wrote:
> > --- linux-2.6.orig/mm/filemap.c
> > +++ linux-2.6/mm/filemap.c
> > @@ -2016,48 +2016,8 @@ int pagecache_write_begin(struct file *f
> >  {
> >  	const struct address_space_operations *aops = mapping->a_ops;
> >  
> > +	return aops->write_begin(file, mapping, pos, len, flags,
> >  							pagep, fsdata);
> >  }
> >  EXPORT_SYMBOL(pagecache_write_begin);
> 
> Please kill pagecache_write_begin/pagecache_write_end, too.

Well.... we *could* have it handle writes for filesystems that don't
implement write_begin/write_end, couldn't we?

 
> >  static ssize_t generic_perform_write(struct file *file,
> >  				struct iov_iter *i, loff_t pos)
> >  {
> > @@ -2481,10 +2253,7 @@ generic_file_buffered_write(struct kiocb
> >  	struct iov_iter i;
> >  
> >  	iov_iter_init(&i, iov, nr_segs, count, written);
> > -	if (a_ops->write_begin)
> > -		status = generic_perform_write(file, &i, pos);
> > -	else
> > -		status = generic_perform_write_2copy(file, &i, pos);
> > +	status = generic_perform_write(file, &i, pos);
> >  
> >  	if (likely(status >= 0)) {
> >  		written += status;
> 
> Can we merge generic_perform_write back into
> generic_file_buffered_write?  generic_file_buffered_write is left as a
> rather useless wrapper after this.

Yeah that makes sense.

 
> > -	->prepare_write(), ->commit_write(), ->sync_page() and ->readpage()
> > +	->write_begin(), ->write_end(), ->sync_page() and ->readpage()
> >  may be called from the request handler (/dev/loop).
> 
> This comment can go away, all file I/O done by the loop device now is
> from a kthread.

Feel like sending a patch to kill that now?

Thanks,
Nick

  reply	other threads:[~2008-09-24 23:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-24 23:41 [patch] fs: remove prepare_write/commit_write Nick Piggin
2008-09-24 23:48 ` Christoph Hellwig
2008-09-24 23:54   ` Nick Piggin [this message]
2008-10-17 17:34 ` Christoph Hellwig
2008-10-17 18:45   ` Badari Pulavarty
2008-10-21  6:20     ` Nick Piggin
2008-10-21 21:35       ` Andrew Morton
2008-10-21 21:36         ` Christoph Hellwig
2008-10-21 21:45           ` Andrew Morton
2008-10-21 21:49             ` Christoph Hellwig
2008-10-21 22:01               ` Andrew Morton
2008-10-22  9:24         ` Nick Piggin
2008-10-22  0:43       ` Andrew Morton
2008-10-22 11:57         ` Edward Shishkin
2008-11-22 10:14         ` [patch 1/2] reiser4: adjust to the new aops Edward Shishkin
2008-11-27 10:34           ` Nick Piggin
2008-11-27 14:34             ` Edward Shishkin
2008-11-27 14:48               ` Nick Piggin
2008-12-26 23:33                 ` [patch 2/2] reiser4: adjust to the new aops fixup Edward Shishkin
2008-10-18  1:57   ` [patch] fs: remove prepare_write/commit_write Nick Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080924235429.GA17508@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=pbadari@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).