All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Jan Tulak <jtulak@redhat.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [proposal] making filesystem tools more machine friendly
Date: Fri, 30 Jun 2017 11:29:06 -0400	[thread overview]
Message-ID: <20170630152906.ztfpez7lyrnmybyi@thunk.org> (raw)
In-Reply-To: <CACj3i70p=ybXZWRncseqwnbs7HAYu-SL02+cj--7T5YnqcwVKQ@mail.gmail.com>

I'm only replying to linux-fsdevel@ because I think that's really the
right list for us to be having this discussion.

So a couple of comments.  First of all, this sort of thing has been
proposed before.  Specifically, this was one of the problems which
EVMS (from IBM, which ultimately lost out to device mapper) had as
part of their project.  Their userspace component has a plug-in
architecture so that file systems could provide a shared library which
could be used by GUI and CLI tools.

I had that support in e2fsprogs, and it was removed when EVMS was
ultimately killed off by device-mapper and LVM.  The commit removal
was in commit 921f4ad53: "Remove support for EVMS 1.x plugin library"
so if you look at the sources in lib/evms in the e2fsprogs git repo at
commit 921f4ad53 (aka 921f4ad53^), you can see what it looked like.

Secondly, as a file system developer and maintainer for e2fsprogs, I'm
going to be extremely hesitant to accept patches which radically
reorganize e2fsprogs and which adds dependencies on third-party
libraries that emit JSON output before I know whether or not your
project is going to be successful, or will ultimately end up getting
abandoned and left for dead, as was the case for EVMS.

That being said, I probably would be willing to accept a drop-in
library, ala lib/evms, where some of the functions were handled
directly via accessing the file system directly via the plugin
library, and where some of the changes were made by wrapping mke2fs
and e2fsck.  Over time, *if* this interface gained legs, I'd be more
willing to try to make a library version of mke2fs (and then _maybe_
e2fsck) so that the plugin library could do more of the work natively,
rather than by wrapping the mke2fs and e2fsck executables.

Third, I think you are *massively* underestimating how much work is
needed to do this in a generic fashion, especially with the file
system check tool.  In any tool where you need to ask the user for
permission to make a particular change to the file system, trying to
do this in a generic way is *hard*, and the "use JSON" is not enough.

At the same time, for the common case, where you just want to "check
to see if the file system is consistent, and return a boolean", or
"check the file system and do all of the safe things", you don't need
all of the complexity of JSON.  So I think JSON is simultaneously too
much (for the simple stuff, where the user doesn't need to see the
output anyway), and too little (for the hard cases where you are doing
a file system repair operation).

For another matter, how you would pass in mkfs parameters, which are
very file system specific, in a completely generic way, is also
completely unspecified in your proposal.  This makes me deeply
suspicious you haven't thought through the issues sufficiently, and if
you try to send patches that massively reorganize e2fsprogs and adds
JSON output in what I suspect will be a horrible, terribly ugly way,
it's most likely I will decline to accept your patches.

This probably means that you will need to do something which starts by
using screen scraping at least initially, and if the maintainers
aren't willing to adopt your code, you're going to have to maintain it
yourself.  That's how EVMS started, and then they asked if I would be
willing to integrate the ext2/3 (this was before ext4) evms plugin
into e2fsprogs, and would I be willing to start making changes to
integrate it more organically into e2fsprogs.  I suspect that kind of
intecremental approach is much more likely to be successful in the
long term.  You may also want to look at the EVMS plugin interfaces,
since the people who tried this did think about what made sense to try
to do in a file system independent way, and what would probably have
to be kept file system specific.

Cheers,

						- Ted

  parent reply	other threads:[~2017-06-30 15:29 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 [this message]
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
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=20170630152906.ztfpez7lyrnmybyi@thunk.org \
    --to=tytso@mit.edu \
    --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 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.