I wonder if it would be possible to implement instant unlinking directory with files in it. Since btrfs is based on b trees it could be possible. Filesystem would have to "loose" all information on directory and object in it, and allow overwriting this information. This would be great feature, because everyone knows that recursive deleting large directories, with milions of files require huge io traffic. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> I wonder if it would be possible to implement instant unlinking > directory with files in it. Since btrfs is based on b trees it could > be possible. Filesystem would have to "loose" all information on > directory and object in it, and allow overwriting this information. > This would be great feature, because everyone knows that recursive > deleting large directories, with milions of files require huge io > traffic.I think you''ll have to read directory contents anyway in order not to break permission/vfs-mountpoint/attributes violation. Consider the following example: # it''s me $ id uid=1000(slyfox) gid=100(users) # fun layout $ ls -ld test test/root_o test/root_o/root_o drwxr-xr-x 3 slyfox users 60 Aug 14 10:56 test drwxr-xr-x 2 root root 60 Aug 14 10:56 test/root_o -rw-r--r-- 1 root root 0 Aug 14 10:56 test/root_o/root_o $ rm -rf test/ rm: cannot remove `test/root_o/root_o'': Permission denied We can''t delete it because of foreigner in our dir. -- Sergei
Not in all cases you can plan and predict where there will be need for deleting large number of files. Also subvolumes are difficult to maintain, not to mention still quite buggy. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
And besides deleting is transparent for any programming language and can be done with no special permissions, while subvolume deletion or creation is of course not. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Excerpts from krzf83@gmail.com''s message of 2011-08-13 17:59:34 -0400:> I wonder if it would be possible to implement instant unlinking > directory with files in it. Since btrfs is based on b trees it could > be possible. Filesystem would have to "loose" all information on > directory and object in it, and allow overwriting this information. > This would be great feature, because everyone knows that recursive > deleting large directories, with milions of files require huge io > traffic.I''m afraid the huge IO traffic is required in order to find the files in the directory and free all the blocks reference by those files. -chris -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html