public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: "Hugo Mills" <hugo@carfax.org.uk>,
	"Tomasz Kłoczko" <kloczko.tomasz@gmail.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: test if a subvolume is a snapshot?
Date: Fri, 8 Sep 2017 18:39:39 +0200	[thread overview]
Message-ID: <20170908163939.GS31874@twin.jikos.cz> (raw)
In-Reply-To: <20170908153816.GD23980@carfax.org.uk>

On Fri, Sep 08, 2017 at 03:38:16PM +0000, Hugo Mills wrote:
> > sometimes I'm really thinking about start rewrite btrfs-progs to make
> > btrfs basic tools syntax as similar as it is only possible to ZFS zfs,
> > zpool and zdb commands on using which in +90% cases you can guess how
> > necessary syntax must look like without looking on man pages.
> > 
> > Any volunteers want to join to help implement something like this?
> > Maybe someone already started doing this?
> 
>    The main complaint that can be directed at the btrfs command is
> that its output is rarely machine-processable. It would therefore make
> sense to have a "--table" or "--structured" mode for output, which
> would be more trivially parsable by shell tools.

My plan is to introduce a global options to set various this, also the
output format, eg.

 $ btrfs --format=json subvolume list

that would dump the list in json obviously, more formats could follow.
This requires to switch all printf to a wrapper that would select the
format based on global config. Some of the code is there, eg. the global
option parser and the config structure. The printf transitions can be
done incrementally. All of that is easy IMHO, somebody just needs to do
it. I work on that when there are no other more pressing things to do.

  parent reply	other threads:[~2017-09-08 16:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08  8:54 test if a subvolume is a snapshot? Ulli Horlacher
2017-09-08 11:37 ` Peter Grandi
2017-09-08 13:10 ` David Sterba
2017-09-08 15:25   ` Tomasz Kłoczko
2017-09-08 15:38     ` Hugo Mills
2017-09-08 16:12       ` Tomasz Kłoczko
2017-09-08 16:24         ` Hugo Mills
2017-09-08 16:39       ` David Sterba [this message]
2017-09-08 18:09         ` Tomasz Kłoczko
2017-09-08 18:44           ` David Sterba
2017-09-08 19:06           ` Austin S. Hemmelgarn
2017-09-08 20:54             ` Tomasz Kłoczko
2017-09-11 12:44               ` Austin S. Hemmelgarn
2017-09-08 16:27     ` David Sterba
2017-09-08 18:41   ` Ulli Horlacher
2017-09-08 18:53     ` David Sterba

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=20170908163939.GS31874@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=hugo@carfax.org.uk \
    --cc=kloczko.tomasz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox