On Fri, May 11, 2018 at 10:01:34AM +0300, Nikolay Borisov wrote: > > > On 11.05.2018 03:11, Omar Sandoval wrote: > > From: Omar Sandoval <osan...@fb.com> > > > > btrfs_orphan_commit_root() tries to delete an orphan item for a > > subvolume in the tree root, but we don't actually insert that item in > > the first place. See commit 0a0d4415e338 ("Btrfs: delete dead code in > > btrfs_orphan_add()"). We can get rid of it. > > > > root->orphan_inodes was used to as a refcount for root->orphan_block_rsv > > and for btrfs_orphan_commit_root(), but both are gone now, so we can get > > rid of it, as well. > > So this really means that the logic for orphaned root item is completely > defunct. Perhaps: > > a) This commit should be expanded to delete all the logic surrounding > orphaned roots: btrfs_find_orphan_roots, BTRFS_ROOT_ORPHAN_ITEM_INSERTED > flag define and any accompanying logic that utilizes this flag (end of > btrfs_orphan_cleanup, orphan root logic at the end of btrfs_get_fs_root > as well) > > b) Have those changes in a separate patch
The root orphan handling is still necessary for subvolume deletion. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html