On Mon, Sep 24, 2012 at 02:42:13PM +0800, Chen Yang wrote:
> In command "btrfs subvolume set-default", we used subvolume <id> and <path>
> to set the default subvolume of a filesystem. It's not easy for a common
> user,
What is not easy? How often do you set-default subvolume that it's a
concern to do it in two steps (list and set-default)?
> so I improved it and the <fullpath> of a subvolume can be used to
> set the default subvolume of a filesystem.
Setting the default directly from a given path would be a good UI
improvement.
> @@ -601,23 +602,66 @@ static int cmd_subvol_get_default(int argc, char **argv)
> static const char * const cmd_subvol_set_default_usage[] = {
> - "btrfs subvolume set-default <subvolid> <path>",
> + "btrfs subvolume set-default [-p] [<subvolid>] <path>",
This new syntax allows these forms:
1. set-default /path
2. set-default -p /path
3. set-default id /path
4. set-default -p id /path
3 is the current behaviour, can you please explain the rest to me? I'm
afraid I'm not following the idea.
> "Set the default subvolume of a filesystem",
> + "-p Set the parent tree(subvolume) of the PATH",
> + " as the default subvolume, if PATH is not a subvolume",
"if PATH is not a subvolume" -- so I don't specify the mountpoint for
PATH and I'm supposed to know if the path is or is not a subvolume --
this is another step I need to do (because I want to be sure that I'm
setting the right subvol), this does not save the commands compared to
the current status.
> NULL
> };
thanks,
david
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html