Re: Linux 2.6.29

From: Jan Kara
Date: Thu Mar 26 2009 - 12:25:22 EST


On Wed 25-03-09 18:34:32, Linus Torvalds wrote:
> On Thu, 26 Mar 2009, Jan Kara wrote:
> >
> > 1) We have to writeout blocks full of zeros on allocation so that we don't
> > expose unallocated data => slight slowdown
>
> Why?
>
> This is in _no_ way different from a regular "write()" system call. And
> there, we just attach the buffers to the page. If something crashes before
> the page actually gets written out, then we'll have hopefully never
> written out the metadata (that's what "data=ordered" means).
Sorry, I wasn't exact enough. We'll attach buffers to the running
transaction and they'll get written out at the transaction commit which is
usually earlier than when the writepage() is called and then later
writepage() will write the data again (this is a consequence of the fact
that JBD commit code just writes buffers without calling
clear_page_dirty_for_io())...
At least ext4 has this fixed because JBD2 already writes out ordered data
via writepages().

Honza
--
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/