[Tux3] Userspace - Removing inode on file delete

kushal dalmia kdpict at gmail.com
Sun Jan 11 13:16:32 PST 2009


diff -r b99b582fe28c user/tux3.c
--- a/user/tux3.c	Sun Jan 11 03:57:45 2009 -0800
+++ b/user/tux3.c	Mon Jan 12 02:16:53 2009 +0530
@@ -265,6 +265,8 @@
 			goto eek;
 		if ((errno = -tree_chop(&inode->btree, &(struct delete_info){ .key
= 0 }, -1)))
 			goto eek;
+		if ((errno = -purge_inum(&inode->i_sb->itable, inum)))
+			goto eek;
 		if ((errno = -tux_delete_entry(buffer, entry)))
 			goto eek;
 		tux_dump_entries(blockread(sb->rootdir->map, 0));
diff -r b99b582fe28c user/tux3fuse.c
--- a/user/tux3fuse.c	Sun Jan 11 03:57:45 2009 -0800
+++ b/user/tux3fuse.c	Mon Jan 12 02:16:53 2009 +0530
@@ -353,8 +353,12 @@
 		goto eek;
 	if ((errno = -tree_chop(&inode.btree, &(struct delete_info){ .key = 0 }, -1)))
 		goto eek;
+	if ((errno = -purge_inum(&inode->i_sb->itable, inum)))
+		goto eek;
 	if ((errno = -tux_delete_entry(buffer, entry)))
 		goto eek;
+	if ((errno = -sync_super(sb)))
+ 		goto eek;

 	fuse_reply_err(req, 0);
 	return;



Just added the purge_inum() call in tux3.c and tux3fuse.c to remove
the inode entry of the deleted file from the ileaf.
Also added a sync_super() in tux3_unlink() of tux3fuse.c. The patch
file is attached herewith.

Regards,
Kushal Dalmia
Chinmay Kamat
Gaurav Tungatkar
Amey Magar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove_inode.patch
Type: text/x-diff
Size: 941 bytes
Desc: not available
URL: <http://phunq.net/pipermail/tux3/attachments/20090112/f67c6549/attachment.patch>
-------------- next part --------------
_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3


More information about the Tux3 mailing list