All of lore.kernel.org
 help / color / mirror / Atom feed
* delalloc makes data=writeback safer
@ 2010-06-09 12:19 Dmitry Monakhov
  2010-06-15 14:08 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Monakhov @ 2010-06-09 12:19 UTC (permalink / raw)
  To: linux-ext4

Everybody know that writeback mode for ext3 is potentially result in
stale data in case of unclean umount. The same is true for ext4 with
nodelalloc.
But as far as i can see things is getting better in case of delalloc.
In case of delalloc we have following calltrace:
[writeback thread]
ext4_da_writepages
  journal_start()
  ext4_map_blocks() -> real block allocation
  mpage_da_submit_io() -> submit_bh() -> submit_bio()
  journal_stop()
So journal will be closed only after data was issued. 
And if journal->j_dev == journal->j_fs_dev (which is usually the case)
data will be serialized with metadata. So it looks like it is impassible
to see stale data even after unclean umount.

Do I miss something? May be this was already discussed before, 
if so please post a link to previous discussion.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: delalloc makes data=writeback safer
  2010-06-09 12:19 delalloc makes data=writeback safer Dmitry Monakhov
@ 2010-06-15 14:08 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2010-06-15 14:08 UTC (permalink / raw)
  To: Dmitry Monakhov; +Cc: linux-ext4

> Everybody know that writeback mode for ext3 is potentially result in
> stale data in case of unclean umount. The same is true for ext4 with
> nodelalloc.
> But as far as i can see things is getting better in case of delalloc.
> In case of delalloc we have following calltrace:
> [writeback thread]
> ext4_da_writepages
>   journal_start()
>   ext4_map_blocks() -> real block allocation
>   mpage_da_submit_io() -> submit_bh() -> submit_bio()
>   journal_stop()
> So journal will be closed only after data was issued. 
> And if journal->j_dev == journal->j_fs_dev (which is usually the case)
> data will be serialized with metadata. So it looks like it is impassible
> to see stale data even after unclean umount.
> 
> Do I miss something? May be this was already discussed before, 
> if so please post a link to previous discussion.
  Well, we turn off delayed allocation when a filesystem gets close to
ENOSPC so it's not completely reliable. But besides this, your observation
looks correct to me.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-15 14:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-09 12:19 delalloc makes data=writeback safer Dmitry Monakhov
2010-06-15 14:08 ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.