# Re: \[PATCH\] btrfs-progs: cmds/subvolume: try to delete subvolume by id when its path can't be reoslved

- From: David Sterba \<hidden\>
- Date: 2021-08-17 13:35:48 
- List: linux-btrfs
- Page: https://ratatoskr.run/linux-btrfs/2021/08/7544640
- Thread: https://ratatoskr.run/linux-btrfs/2021/06/7541452/t.md

```text
On Mon, Jun 28, 2021 at 06:26:28PM +0800, Qu Wenruo wrote:
> There is a recent report of ghost subvolumes where such subvolumes has
> no ROOT_REF/BACKREF, and 0 root ref.
> But without an orphan item, thus kernel won't queue them for cleanup.
> 
> Such ghost subvolumes are just here to take up space, and no way to
> delete them except by btrfs check, which will try to fix the problem by
> adding orphan item.
> 
> There is a kernel patch submitted to allow btrfs to detect such ghost
> subvolumes and queue them for cleanup.
> 
> But btrfs-progs will not continue to call the ioctl if it can't find the
> full subvolume path.
> 
> Thus this patch will loose the restriction by allowing btrfs-progs to
> continue to call the ioctl even if it can't grab the subvolume path.
> 
> Signed-off-by: Qu Wenruo <redacted>

Added to devel, thanks. Please send a test case.
```
