Re: Linux 2.6.29

Jan Kara
2009-03-26T16:25:21Z

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@suse.cz>
SUSE Labs, CR