Message ID | 20191021093755.56835-1-wqu@suse.com (mailing list archive) |
---|---|
Headers | show |
Series | btrfs-progs: check: Introduce optional argument for -b|--backup | expand |
On Mon, Oct 21, 2019 at 05:37:52PM +0800, Qu Wenruo wrote: > Before this patchset, if we want to use backup roots, it's only possible > to let btrfs-check to automatically choose the backup. > > If user want to use a specified backup, it can only use -r|--tree-root > option along with backup roots dump from "btrfs ins dump-super". > > This patchset will introduce optional argument for -b|--backup, so user > can specify which backup to use by providing the generation difference > (-3, -2, -1). Please don't introduce the optional arguments. I think we've learned the lesson with 'defrag -c' or balance -d/-m arguments. In this case a long option would be fine as the backup roots is not something that's used often. We can keep the --backup as "use first good" and add the more specific selection.
On 2019/11/15 下午8:32, David Sterba wrote: > On Mon, Oct 21, 2019 at 05:37:52PM +0800, Qu Wenruo wrote: >> Before this patchset, if we want to use backup roots, it's only possible >> to let btrfs-check to automatically choose the backup. >> >> If user want to use a specified backup, it can only use -r|--tree-root >> option along with backup roots dump from "btrfs ins dump-super". >> >> This patchset will introduce optional argument for -b|--backup, so user >> can specify which backup to use by providing the generation difference >> (-3, -2, -1). > > Please don't introduce the optional arguments. I think we've learned the > lesson with 'defrag -c' or balance -d/-m arguments. In this case a long > option would be fine as the backup roots is not something that's used > often. We can keep the --backup as "use first good" and add the more > specific selection. > OK, I'll rename it to something like --backup-gen-diff, and get rid of the minus geneartion part. Thanks, Qu