Skip to contentSkip to conversation

delalloc makes data=writeback safer

DISCUSSION Dmitry Monakhov 2 participants 2 messages Jun 9, 2010 – Jun 15, 2010

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw
Quoted 16 lines

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.

Quoted 2 lines

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

Signature · 2 lines
Jan Kara <[email protected]>
SuSE CR Labs