linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Chris Mason <chris.mason@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Theodore Ts'o <tytso@mit.edu>,
	Linux Kernel Developers List <linux-kernel@vger.kernel.org>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>,
	Mike Galbraith <efault@gmx.de>
Subject: Re: [PATCH RFC] ext3 data=guarded v5
Date: Thu, 30 Apr 2009 13:38:23 +0200	[thread overview]
Message-ID: <20090430113823.GC29220@duck.suse.cz> (raw)
In-Reply-To: <1241037421.20099.70.camel@think.oraclecorp.com>

On Wed 29-04-09 16:37:01, Chris Mason wrote:
> On Wed, 2009-04-29 at 22:04 +0200, Jan Kara wrote:
> 
> > > What we don't want to do is have a call to write() over existing blocks
> > > in the file add new things to the data=ordered list.  I don't see how we
> > > can avoid that without datanew.
> >   Yes, what I suggest would do exactly that:
> > In ordered_writepage() in the beginning we do:
> >   page_bufs = page_buffers(page);
> >   if (!walk_page_buffers(NULL, page_bufs, 0, PAGE_CACHE_SIZE,
> >                          NULL, buffer_unmapped)) {
> >   	return block_write_full_page(page, NULL, wbc);
> >   }
> > So we only get to starting a transaction and file some buffers if some buffer
> > in the page is unmapped. Write() maps / allocates all buffers in write_begin()
> > so they are never added to ordered lists in writepage().
> 
> Right, writepage doesn't really need datanew.
> 
> >  We rely on write_end
> > to do it. So the only case where not all buffers in the page are mapped is
> > when we have to allocate in writepage() (mmaped write) or the two cases I
> > describe above.
> 
> But I still think write_end does need datanew.  That's where 99% of the
> ordered buffers are going to come from when we overwrite the contents of
> an existing file.
  Ah, true, buffer_new() can be cleared in __block_prepare_write() in some
cases. Frankly, I don't see a reason why that happens but that's another
story.

									Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  reply	other threads:[~2009-04-30 11:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28 18:04 [PATCH RFC] ext3 data=guarded v5 Chris Mason
2009-04-28 18:33 ` Mike Galbraith
2009-04-28 18:54   ` Chris Mason
2009-04-29  2:12 ` KOSAKI Motohiro
2009-04-29  8:56 ` Jan Kara
2009-04-29 14:08   ` Chris Mason
2009-04-29 14:43     ` Chris Mason
2009-04-29 19:47       ` Andreas Dilger
2009-04-29 19:15     ` Jan Kara
2009-04-29 19:41       ` Chris Mason
2009-04-29 20:04         ` Jan Kara
2009-04-29 20:37           ` Chris Mason
2009-04-30 11:38             ` Jan Kara [this message]
2009-04-29 21:53         ` Theodore Tso
2009-04-29 19:51 ` [PATCH RFC] ext3 data=guarded v6 Chris Mason
2009-04-29 20:21   ` Jan Kara
2009-04-29 20:53   ` [PATCH RFC] ext3 data=guarded v7 Chris Mason
2009-04-30 11:52     ` Jan Kara
2009-04-30 13:17       ` Chris Mason

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=20090430113823.GC29220@duck.suse.cz \
    --to=jack@suse.cz \
    --cc=chris.mason@oracle.com \
    --cc=efault@gmx.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    /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).