lkml.org 
[lkml]   [2005]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 130/198] ext2 corruption - regression between 2.6.9 and 2.6.10
> Mingming Cao <cmm@us.ibm.com> said:
> The ext2 handle discard preallocation differently at that time, it discard the
> preallocation at each iput(), not in input_final(), so we think it's
> unnecessary to thrash it so frequently, and the right thing to do, as we did
> for ext3 reservation, discard preallocation on last iput(). So we moved the
> ext2_discard_preallocation from ext2_put_inode(0 to ext2_clear_inode.
>
> Since ext2 preallocation is doing pre-allocation on disk, so it is possible
> that at the unmount time, someone is still hold the reference of the inode, so
> the preallocation for a file is not discard yet, so we still mark those blocks
> allocated on disk, while they are not actually in the inode's block map, so
> fsck will catch/fix that error later.
>
> This is not a issue for ext3, as ext3 reservation(pre-allocation) is done in
> memory.

Shouldn't we have a pass to discard on unmount instead? ->put_inode is
a really bad interface and all usages including this one are racy (not that
it matters too much here, but I'd like to get rid of it eventually).

As a band-aid to avoid the corruption it's certainly okay (and needed), but
we should try to fix this for real. Mingming, do you want to look into it
or should I put it on my TODO list?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-18 13:26    [W:0.036 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site