Re: btrfs-progs confusing message

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

 



On 2016-04-20 16:23, Konstantin Svist wrote:
Pretty much all commands print out the usage message when no device is
specified:

[root@host ~]# btrfs scrub start
btrfs scrub start: too few arguments
usage: btrfs scrub start [-BdqrRf] [-c ioprio_class -n ioprio_classdata]
<path>|<device>
...

However, balance doesn't

[root@host ~]# btrfs balance start
ERROR: can't access 'start': No such file or directory

And this is an example of why backwards comparability can be a pain. The original balance command was 'btrfs filesystem balance', and had no start, stop, or similar sub-commands. This got changed to the current incarnation when the support for filters was added. For backwards compatibility reasons, we decided to still accept balance with no arguments other than the path as being the same as running 'btrfs balance start' on that path, and then made the old name an alias to the new one, with the restriction that you can't pass in filters through that interface. What is happening here is that balance is trying to interpret start as a path, not a command, hence the message about not being able to access 'start'.

--
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