Re: [PATCH v3] btrfs-progs: change subvol set-default to also accept subvol path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 06, 2017 at 10:05:08AM +0900, Misono, Tomohiro wrote:
> This patch changes "subvol set-default" to also accept the subvolume path
> for convenience.
> 
> This is the one of the issue on github: 
> https://github.com/kdave/btrfs-progs/issues/35
> 
> If there are two args, they are assumed as subvol id and path to the fs
> (the same as current behavior), and if there is only one arg, it is assumed
> as the path to the subvolume.
> 
> subvol id is resolved by test_issubvolume() + lookup_path_rootid().
> Empty subvol (ino==2) will get error on test_issubvolume() which checks
> whether inode num is 256 or not.
> 
> Signed-off-by: Tomohiro Misono <misono.tomohiro@xxxxxxxxxxxxxx>

Applied with some minor changes. Meanwhile I've added support for
multi-line help string for different usage schemas so

	"btrfs subvolume set-default [<subvolume>|<subvolid> <path>]",

is now

	"btrfs subvolume set-default <subvolume>",
	"btrfs subvolume set-default <subvolid> <path>",

Please note that [...] means that's an optional argument, which would be
confusing. OTOH writing the two ways without [ ] on one line would
confusing as well, so I more lines is much better IMHO.

Patch applied, please send a test, for the 'cli' category. I'm going to
unify the help text and documentation. Thanks.
--
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




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux