Sunday, June 25, 2006

ZFS Recycle Bin Phase 1

I've been working on #4852821: user undo for the past few weeks, and today I've finally reached a milestone of sorts.

nerant@archon [/export/home/nerant]cd /undo4/fs1
nerant@archon [/undo4/fs1]ls -ahl
total 9
drwxr-xr-x 3 nerant sys 3 Jun 25 19:12 .
drwxr-xr-x 3 root sys 3 Jun 25 19:03 ..
drwxr-xr-x 2 nerant other 3 Jun 25 19:13 messages
nerant@archon [/undo4/fs1]cd messages/
nerant@archon [/undo4/fs1/messages]ls -ahl
total 8
drwxr-xr-x 2 nerant other 3 Jun 25 19:13 .
drwxr-xr-x 3 nerant sys 3 Jun 25 19:12 ..
-rw-r--r-- 1 nerant other 17 Jun 25 19:12 msg0
nerant@archon [/undo4/fs1/messages]cat ./msg0
SUPERMAN RETURNS
nerant@archon [/undo4/fs1/messages]rm ./msg0
nerant@archon [/undo4/fs1/messages]ls -ahl
total 6
drwxr-xr-x 2 nerant other 2 Jun 25 19:19 .
drwxr-xr-x 3 nerant sys 3 Jun 25 19:12 ..
nerant@archon [/undo4/fs1/messages]mv /undo4/fs1/.zfs/deleted/messages/msg0 .
nerant@archon [/undo4/fs1/messages]cat ./msg0
SUPERMAN RETURNS

Through some magic vnode and znode hackery, deleted files now appear in .zfs/deleted, with the entire namespace reproduced. :)

I'm looking forward to implementing the quota part of the RFE during the next week or so.

Feel free to email me with your comments! Feedback is appreciated.

2 Comments:

Blogger Binary Crusader said...

Awesome work! Can't wait to see what else you accomplish. Keep it up!

5:55 PM  
Blogger Askinstoo said...

Hey! Very Nice! Check out this website I found where you can make extra cash.
It's not available everywhere, so go to the site and see if you can find something. I found something and make
and extra $900 a month!

http://www.degree-programs-online.info/extramoney.htm

1:10 AM  

Post a Comment

<< Home