Hi,
On Tue, 2003-02-18 at 18:14, Daniel Oliveira Nascimento wrote:
> I want to make some changes in ext3_unlink code to make undelete works, i
> read a lot about it and im planning to put this lines in that function:
>
> if (IS_UNDEL(inode)){
> trash = ????
> ext3_link(dir,dentry,trash); //make a hard link
> }
Ouch, my head hurts just thinking of the number of ways in which this
could go wrong!
There isn't much locking done inside ext3 for directory structures ---
all of the locking for that is done inside the Linux VFS layers. To get
this sort of undelete done right, you would _have_ to work in those
upper layers. Anything else would be terribly prone to races.
Cheers,
Stephen