Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Sidong Yang <realwakka@gmail.com>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v3 2/2] btrfs-progs: device stats: add json output format
Date: Fri, 11 Dec 2020 18:09:11 +0000	[thread overview]
Message-ID: <20201211180911.GB456927@realwakka> (raw)
In-Reply-To: <20201211174629.GQ6430@twin.jikos.cz>

On Fri, Dec 11, 2020 at 06:46:29PM +0100, David Sterba wrote:
> On Fri, Dec 11, 2020 at 06:30:25PM +0100, David Sterba wrote:
> > On Fri, Dec 11, 2020 at 04:48:12PM +0000, Sidong Yang wrote:
> > > Example json format:
> > > 
> > > {
> > >   "__header": {
> > >     "version": "1"
> > >   },
> > >   "device-stats": [
> > >     {
> > >       "device": "/dev/vdb",
> > >       "devid": "1",
> > >       "write_io_errs": "0",
> > >       "read_io_errs": "0",
> > >       "flush_io_errs": "0",
> > >       "corruption_errs": "0",
> > >       "generation_errs": "0"
> > >     }
> > >   ],
> >      ^
> > 
> > I've verified that the comma is really there, it's not a valid json so
> > there's a bug in the formatter. To verify that the output is valid you
> > can use eg. 'jq', simply pipe the output of the commadn there.
> > 
> >   $ ./btrfs --format json dev stats /mnt | jq
> >   parse error: Expected another key-value pair at line 16, column 1
> 
> I've pushed the updated plain text formatting to devel, so the only
> remaining bug is the above extra comma.

I've tested devel branch. but there is no extra comma and I also tested
with jq you said. jq results no error. I think that It's just mistype in
message.

  reply	other threads:[~2020-12-11 19:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11 16:48 [PATCH v3 1/2] btrfs-progs: common: extend fmt_print_start_group handles unnamed group Sidong Yang
2020-12-11 16:48 ` [PATCH v3 2/2] btrfs-progs: device stats: add json output format Sidong Yang
2020-12-11 17:30   ` David Sterba
2020-12-11 17:46     ` David Sterba
2020-12-11 18:09       ` Sidong Yang [this message]
2020-12-16 17:23         ` David Sterba
2020-12-16 17:41           ` David Sterba
2020-12-16  6:30       ` Su Yue
2020-12-16 10:52         ` Sidong Yang
2020-12-16 12:52           ` Su Yue
2020-12-16 17:21             ` David Sterba
2020-12-16 17:18         ` David Sterba
2020-12-11 17:31 ` [PATCH v3 1/2] btrfs-progs: common: extend fmt_print_start_group handles unnamed group 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=20201211180911.GB456927@realwakka \
    --to=realwakka@gmail.com \
    --cc=dsterba@suse.cz \
    --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