All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: L A Walsh <lkml@tlinx.org>
Cc: Karel Zak <kzak@redhat.com>, util-linux@vger.kernel.org
Subject: Re: Using the upcoming fsinfo()
Date: Wed, 22 May 2019 10:59:38 +0800	[thread overview]
Message-ID: <17de51282f3c3fafd3e99bff5aeb49d17e70b603.camel@themaw.net> (raw)
In-Reply-To: <5CE44FA5.9000700@tlinx.org>

On Tue, 2019-05-21 at 12:21 -0700, L A Walsh wrote:
> On 2019/05/15 17:13, Ian Kent wrote:
> > And, as I mentioned above, there's the needed ->fsinfo() super operation
> > to cover the use of the existing ->show_options() operation (provided
> > by pretty much all file systems) to get the file system specific options.
> > 
> > So there's quite a bit of detail to be worked out for fsinfo() to be
> > able to correctly provide all mount information.
> > 
> > But, hey, that was the point of doing this now.
> >   
> 
> ----
> 	Maybe this is already planned behind the scenes, but I wanted to
> throw out my own suggestion -- and that is to start with the new 
> system call usage in its own cmdline tool that can be used just to call
> or exercise the new call -- effectively allowing calling the new kernel call
> from any shell based program -- allowing for a passthrough type operation.

I hadn't planned on producing a utility but I do have code that I've
been using to learn how to use the call.

I could turn that into a utility for use from scripts at some point.

> 
> 	This serves to workout that the call always returns what you 
> expect it to, familiarity with the new call and how it works as well as
> developing a first interface to construct and parse calls-to and 
> output-from the call.

Avoiding having to parse string output (from the proc file system
mount tables) is one of the key reasons to use a system call for
this.

So this isn't the point of doing it.

The work for this (and some other new system calls) is being done
in the kernel so the issue isn't to work out what the system call
returns as much as it is to ensure the system call provides what's
needed, implement things that aren't yet done and work out ways of
providing things that are needed but can't yet be provided.

> 
> 	From there -- those first options could be moved to only 
> be used with '--raw' or '--direct' switch with a new switch associated
> with, perhaps another util that may eventually be replaced  with this
> code that uses the new utility.
> 
> 	All of that could be done along with a continuing build and
> release of the older tools until such time as the new call-using
> tool replaces all of the old tool to whatever standard is wanted.

I haven't looked at the tools at all.

It may be worth looking at them but fork and exec a program then
parse text output isn't usually the way these utilities should
work.

> 
> 	That way, it could allow not disturbing old code
> while code is developed for using the new interface, allowing for
> a seamless switch sometime later with the old progs being left around
> for a release with some 'old' prefix and eventually not built by default
> and moved to the project's "attic" later on.
> 
> 	This can allow for an extended period of feedback & development
> until all users are comfy w/the new tool (which might, in some cases,
> have an option to generate the same output as the old tool (but using
> the new call) for older scripts that might be less easy to update.
> 
> Anyway, just my general caution in code rewrites replacing old libs & utils.
> And again, please forgive my saying something that may be self-evident,
> standard procedure, or already planned, but just not detailed on list.

The focus is on eliminating the need to read the proc file system
mount tables including getting the mount information for any single
mount.

When these tables are large and there's a fair bit of mount/umount
activity this can be a significant problem.

Getting this information usually means reading on average half of
the whole mount table every time and it's not possible to get info.
on a single mount without doing this.

Ian


  reply	other threads:[~2019-05-22  2:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-13  5:33 Using the upcoming fsinfo() Ian Kent
2019-05-13  9:08 ` Karel Zak
2019-05-13 16:04   ` Bruce Dubbs
2019-05-14  0:04     ` Ian Kent
2019-05-15 11:27     ` Karel Zak
2019-05-14  0:23   ` Ian Kent
2019-05-15 11:45     ` Karel Zak
2019-05-16  0:13       ` Ian Kent
2019-05-21 19:21         ` L A Walsh
2019-05-22  2:59           ` Ian Kent [this message]
2019-05-22  3:12             ` Ian Kent
2019-05-22  4:28             ` L A Walsh
2019-05-22 13:14               ` Ian Kent
2019-05-22 13:55                 ` Karel Zak
2019-05-23  1:27                   ` Ian Kent

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=17de51282f3c3fafd3e99bff5aeb49d17e70b603.camel@themaw.net \
    --to=raven@themaw.net \
    --cc=kzak@redhat.com \
    --cc=lkml@tlinx.org \
    --cc=util-linux@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.