On Wed, 2006-05-24 at 11:31 -0700, Eric Schrock wrote:
> On Wed, May 24, 2006 at 11:22:23AM -0700, Erik Trimble wrote
> > Isn't this an application feature, not a filesystem feature?  I would
> > expect something like this behavior when using Nautilus, but certainly
> > not when using "rm".
> 
> This is exactly why it should be supported.  It is
> application-independent.  If you count the number of Solaris users who
> type 'rm' versus the number that click-and-drag files to the trash bin,
> I'd wager that you'd find many, many, orders of magnitude more folks who
> don't _want_ to rely on application features.  The recycle bin is also
> per-user, not per-filesystem.  The location of the copy is dependent on
> who did the original deletion, and may not be accessible (i.e. over NFS)
> in the same way as the original filesystem.

But my point being that "undo" is appropriate at the APPLICATION level,
not the FILESYSTEM level.  An application (whether Nautilus or "rm")
should have the ability to call a system library to support "undo",
which has the relevant code, but ZFS itself should have no concept of
"undo".  This keeps the applications FS-agnostic, so you support "undo"
across ZFS, UFS, NFS, etc. 

So, our mythical system library (libundelete.so) should support a couple
of generic functions (say:  int safe_unlink(const char *path), and void
empty_recyclebin(const char *path) which look for an ENV variable to
determine if they should recycle or should delete, as appropriate) for
applications to call, and then the library code has to support
implementing this on various FSes.


Maybe, MAYBE, after we implement a generic system library call to
support "undo" across all (reasonable) FSes, we consider putting in
"undo" in the actual FS for performance reasons, so that the library can
simply call the FS libraries to do the "undo".   




-- 
Erik Trimble
Java System Support
Mailstop:  usca14-102
Phone:  x17195
Santa Clara, CA
Timezone: US/Pacific (GMT-0800)

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to