linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: Jan Tulak <jtulak@redhat.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [proposal] making filesystem tools more machine friendly
Date: Mon, 27 Nov 2017 16:24:40 +0000	[thread overview]
Message-ID: <75aa3bae-76a6-ff48-e33c-cd0f27d13231@redhat.com> (raw)
In-Reply-To: <CACj3i70agGuRQCV5+WmQdcapHqTGkcLBHkLUQmSO9BtjwaogQQ@mail.gmail.com>

On 27/11/17 15:38, Jan Tulak wrote:
> On Mon, Nov 27, 2017 at 3:57 PM, Andrew Price <anprice@redhat.com> wrote:
>> On 30/06/17 09:17, Jan Tulak wrote:
>>>
>>> AKA filesystem API
>>>
>>> Hi guys
>>>
>>> Currently, filesystem tools are not made with automation in mind. So
>>> any tool that wants to interact with filesystems (be it for
>>> automation, or to provide a more user-friendly interface) has to
>>> screen scrape everything and cope with changing outputs.
>>>
>>> I think it is the time to focus some thoughts on how to make the fs
>>> tools easier to be used by scripts and other tools.
>>
>>
>> What's the status of this? I'd like to make sure gfs2-utils is geared up for
>> it and catered for, whatever solution is chosen.
> 
> I decided to go the way of using wrapper at first - that solves some
> of the use cases I'm concerned sooner. And if there are enough users
> of this wrapper, then in a time I can look at the integration again.
> 
>>
>> Perhaps this ship has already sailed, but, I think a json dependency may be
>> a little too heavy, and perhaps a simpler stream of key-value lists that can
>> be generated with fprintf() would suffice? For accepting options, we already
>> have code to parse that sort of thing as we handle "foo=bar,baz=42" style
> 
> That's not enough once you have any hierarchy in your data, i.e.
> multiple volumes in a group, and each has a name or path... Hence, I
> strived for an advanced format, like JSON. 

A nested format is not necessarily required to describe a nested 
structure. It does take away the need for a "parent" field in each 
record but I'm not convinced that is a sufficent trade-off for adding a 
json lib dependency.

> However, if gfs2-utils does
> not need anything more, there is no need to use a complex solution for
> this moment.

I think the only hierarchical support we might want is for progress 
reporting to be split into stages and sub-stages.

> What makes it easy to add a common format, later on, is not having
> prints all through the program together with a heap of exit() calls,

I'm not sure I understand this point...

> and rather, if there is some structure containing the state from which
> the output is created at one point no matter what. Of course, that can
> be difficult to achieve if you want to print some progress or if the
> program would require deeper changes... which is why I let it be for
> now until I can show that there really is a sufficient interest from
> the users of a wrapper, and the effort is better justified.

Okay, thanks for the update. In case it helps in future, I'm willing to 
experiment with a (test?) tool that works with the gfs2-utils in a 
development branch.

Andy

  reply	other threads:[~2017-11-27 16:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30  8:17 [proposal] making filesystem tools more machine friendly Jan Tulak
2017-06-30 10:22 ` Arvin Schnell
2017-06-30 13:58 ` Emmanuel Florac
2017-06-30 15:29 ` Theodore Ts'o
2017-07-03 11:52   ` Jan Tulak
2017-07-03 15:07     ` Theodore Ts'o
2017-07-03 17:37       ` Darrick J. Wong
2017-07-04 13:57         ` Jan Tulak
2017-07-04 19:07           ` Theodore Ts'o
2017-07-12  8:42             ` Jan Tulak
2017-07-05 18:11 ` Christoph Hellwig
2017-07-12 13:00   ` Jan Tulak
2017-07-12 17:10 ` Richard W.M. Jones
2017-11-27 14:57 ` Andrew Price
2017-11-27 15:38   ` Jan Tulak
2017-11-27 16:24     ` Andrew Price [this message]
2017-11-27 16:42       ` Jan Tulak

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=75aa3bae-76a6-ff48-e33c-cd0f27d13231@redhat.com \
    --to=anprice@redhat.com \
    --cc=jtulak@redhat.com \
    --cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).