I. What Has Been Done
1. Undelete flag present, copy to inode 6
2. Move "deleted" files from the undelete directory to the user’s current
directory
3. Periodically check the undelete directory, purge create the directory
in inode 6
old files.
II. Undelete directory
1. Used the ext2fsprogs version 1.06
2. Modified mke2fs to create directory
3. No name, no parent, no linking
4. Modified e2fsck so inode 6 would be treated as a valid inode
II. Checking flag & moving
to undelete directory
1. Check the
undelete flag in ext2_unlink()
2. If the undelete flag is present call ext2_cp_undel()
3. Ext2_cp_undel adds a directory entry for the file in the undelete directory,
removes the entry
from the old directory.
4. Link count++ so the file is not deleted
III.
Lsdel & undelete syscalls
1. Want to know what’s in undelete dir? lsdel
2. Want to undelete? undelete <filename>
3. If you are not the owner of the file…
4. Fatal Error, Permission Denied, Illegal Access, etc.
5. Else, file copied to current directory
IV. What Remains to be Done
1. Undelete dir housecleaning:
A. If not cleaned, your disk drive may
get full of "deleted" files
B. Daemon - integration with kernel, elegance
C. Cron script - simplicity
D. System call - convinience - done!
E. all of the above!
V. Bottlenecks
1. Unable to unmount undelete-capable partitions - partially done
2. Chattr +u inconsistencies
3. Preserving the directory structure - not in this version