On Tue, Aug 07, 2018 at 06:39:50PM +0200, David Sterba wrote: >On Sun, Aug 05, 2018 at 06:39:57PM +0800, Lu Fengqi wrote: >> This patchset will add the BTRFS_IOC_SUBVOL_UNDELETE ioctl for online >> btrfs subvolume undelete. >> >> And btrfs subvolume undelete subcommand was added to btrfs-progs. >> >> So user can use the following command to recover all the subolume that >> is left on the device. The recovered subvolume will be link to <dest> dir >> named to <name_prefix><subvol_id>. > >Hm, I don't agree with the proposed interface - to recover all deleted >subvolumes. IMO this should recover just one subvolume of a given id a >to given directory.
Thank you for taking the time to respond. I may have thought too much about the interface before. In my imagination, the cleaner kthread is like a monster that devours user data at any time, so the user must perform an online undelete operation as soon as possible, so there is no time to determine the subvol_id that should be passed. However, I have to admit that I don't know much about the user's actual usage scenarios, I will accept the interface you provided. Of course, I really like this because it greatly simplifies the ioctl structure. > >The ioctl structure has to be reworked, I've skimmed the code and saw >some suspicious things but will have a look after the interface is >settled. When I rework the ioctl structure, I will carefully recheck the incorrect place in the code. -- Thanks, Lu -- 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