1 Feb 2004 07:00
Ext3 and undeletion - A way how it could work.
Bodo Thiesen <bothie <at> gmx.de>
2004-02-01 06:00:58 GMT
2004-02-01 06:00:58 GMT
Hello.
After reading some mails from mailing list archives and other sources,
ext3 seems to having troubles in deleting files w/o destroying the data
neccessary to undelete them. Ok, I know what journaling means, and in any
way, the ext3 fs driver needs to keep track of which blocks have actually
been marked as being free. But now my question: Who say, that this
information must be stored in the original inode data? The answer is: Is
isn't neccessary at all. Ok, how then?
My prescription:
1.1. We need a fixed inode, I'll refer to that as the "deletion inode"
here.
1.2. We need three blocks, whichs block numbers could be stored in the
super block. I'll refer to them as "deletion blocks" here.
Now, lets assume, a user enters rm foo.img where foo.img is a very big
file. The steps, the ext3fs driver currently does is (IIRC, at least):
2.1. Link the inode to a special list of "inodes to delete". -- no change
here.
2.2. Check, if any inode is being delete in the moment. If not start it
now (go on with 3.1.). -- no change here.
Actual deletion: (That action initiated in step 2.2.)
Here, the procedure will completely changed:
3.1. Copy the inode (the 128 bytes, not the conten of the file
to the
(Continue reading)
RSS Feed