All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Konstantin Svist <fry.kun@gmail.com>, linux-btrfs@vger.kernel.org
Subject: Re: btrfs-progs confusing message
Date: Thu, 21 Apr 2016 07:02:49 -0400	[thread overview]
Message-ID: <5718B359.4090207@gmail.com> (raw)
In-Reply-To: <5717E55A.5070400@gmail.com>

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


  reply	other threads:[~2016-04-21 11:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 20:23 btrfs-progs confusing message Konstantin Svist
2016-04-21 11:02 ` Austin S. Hemmelgarn [this message]
2016-04-21 16:53   ` Konstantin Svist

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5718B359.4090207@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=fry.kun@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.