[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Retaining undelete data on ext3

On Mon, Sep 25, 2006 at 03:22:42PM -0700, Stephen Samuel wrote:
> As far as I can tell, the only thing that gets zeroed
> is the block pointers in the inode (i.e. 12 direct pointers
> and one each of single, double and tripple indirects).
> so, I'm presuming that all that should need to be
> regenerated (and saved), above and beyond what is
> already done, is the pointers in the inode itself, which
> should take slightly less core than the whole inode entry.

That surprises me, and I'm not sure that's always true, in particular
if the transaction touches so many block allocation bitmaps that the
unlink gets broken up into multiple transactions.  In that case I
would think the indirect blocks might have to be partially cleared so
that the on-disk image is consistent if we crash in the middle of the
unlink.  Still, I haven't crawled through the code in detail in a
while, and it's possible that we do the block_forget on indirect block
boundaries to avoid this.  

But if it's just a matter of saving and restoring the inode fields,
yes, that would be a much simpler patch.

						- Ted

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]