[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090430113823.GC29220@duck.suse.cz>
Date: Thu, 30 Apr 2009 13:38:23 +0200
From: Jan Kara <jack@...e.cz>
To: Chris Mason <chris.mason@...cle.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Theodore Ts'o <tytso@....edu>,
Linux Kernel Developers List <linux-kernel@...r.kernel.org>,
Ext4 Developers List <linux-ext4@...r.kernel.org>,
Mike Galbraith <efault@....de>
Subject: Re: [PATCH RFC] ext3 data=guarded v5
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@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists