Re: How To Recover Files From ext3 Partition??

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

 



Hi,

On Mon, 2006-05-08 at 14:34 +0200, Erik Mouw wrote:

> > Trouble is, there's no guarantee that that transaction would actually
> > fit into the journal.  Most of the time it will, but if it doesn't, then
> > we deadlock or risk data corruption.  
> 
> Is there some way to determine in advance if a transaction fits into
> the journal?

For truncate/delete, no, not easily.  Or rather, it's possible, but only
for trivially short files.  The trouble is that we can't assume that all
of the file's blocks are on the same block groups, so each block in the
file is potentially an update to a new group descriptor and a new block
bitmap (ie. 2 blocks of journal per block of file.)

That's hugely pessimistic, of course, but it is the genuine worst-case
scenario and we have to be prepared for it.  We only work out that we
need less once we actually start walking the file's indirect tree, at
which point the truncate is already under way.  

We _could_ walk the tree twice, but that would be unnecessarily
expensive, especially for large files.

--Stephen


-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux