From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Yan, Zheng" Subject: snapshot/subvol deletion Date: Tue, 25 Aug 2009 22:38:01 +0800 Message-ID: <4A93F749.3010708@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 To: linux-btrfs@vger.kernel.org Return-path: List-ID: Hi, I will send a series patches that add snapshot/subvol deletion soon. But the way to delete snapshot/subvol is far from people's expectancy. To delete a snapshot/subvol, we need four steps: 1) snapshot/subvol deletion ioctl or rmdir; 2) umount; 3) btrfsck; 4) mount the fs. The reason for this is bug in root back & forward references. In simple terms, the bug prevents us from knowing how many places a snapshot/subvol is referenced. So it's unsafe delete corresponding fs tree immediately after a link to snapshot/subvol is removed. Regards Yan, Zheng