xfs
[Top] [All Lists]

Re: Undeletion

To: Michael <soppscum@xxxxxxxxx>
Subject: Re: Undeletion
From: Andi Kleen <ak@xxxxxxx>
Date: Sun, 22 Sep 2002 02:25:36 +0200
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20020922001452.52752d52.soppscum@xxxxxxxxx>
References: <20020922001452.52752d52.soppscum@xxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.22.1i
On Sun, Sep 22, 2002 at 12:14:52AM +0200, Michael wrote:
> I'm certain XFS will probably never be rewritten to support undeletion.
> But I'm just curious if this was conscious and why?(maybe just "wasn't 
> important"?)

Actually XFS internally does something very similar to undeletion.
In Unix it is possible to delete all links to a file and still have the
file open by some process. The file is then deleted when the process exits.
When the system crashes before that happens these unnamed files need to 
be cleaned up somehow, otherwise you would lose disk space after reboot.
On a non journaled unix filesystem that is done by fsck after the unclean
shutdown. On a journaled filesystem this doesn't work. XFS puts these files
into a special data structure on disk and deletes them on the next mount.

I guess it would be possible to extend this to put files that have been 
marked somehow (e.g. with a special extended attribute) on unlink into this
store as well and only free them when the disk space runs low.

Of course someone would need to implement this. I don't think it would 
need a "rewrite" however.


-Andi


<Prev in Thread] Current Thread [Next in Thread>