Messages in this thread | | | Subject | Re: ext4 features | From | Alan Cox <> | Date | Mon, 03 Jul 2006 23:17:13 +0100 |
| |
Ar Llu, 2006-07-03 am 23:25 +0200, ysgrifennodd Diego Calleja: > > Add a salvagable file system to ext4, i.e. when a file is deleted, you > > just rename it and move it to a directory called DELETED.SAV and recycle > > the files as people allocate new ones. Easy to do (internal "mv" of > > > Easily doable in userspace, why bother with kernel programming
To get the semantics you need and avoid rewriting all of user space. At the moment some GNU apps support this type of stuff but its not in the core libraries so it isn't generalised.
There are some big problems with "deleted" however and doing it in kernel space. A lot of programs just overwrite data. You would have to look for things like O_TRUNC on a file open and ftruncate.
The ftruncate case is particularly ugly because there are programs that do lots of ftruncate calls as they run and don't neccessarily "overwrite" data but are merely trimming logs or database files.
To add to the fun the 'old' file needs to be the one which ends up with a new inode number and the like.
Alan - 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/
| |