All of lore.kernel.org
 help / color / mirror / Atom feed
From: L A Walsh <lkml@tlinx.org>
To: Ian Kent <raven@themaw.net>, Karel Zak <kzak@redhat.com>,
	util-linux@vger.kernel.org
Subject: Re: Using the upcoming fsinfo()
Date: Tue, 21 May 2019 21:28:31 -0700	[thread overview]
Message-ID: <5CE4CFEF.5020100@tlinx.org> (raw)
In-Reply-To: <17de51282f3c3fafd3e99bff5aeb49d17e70b603.camel@themaw.net>

On 2019/05/21 19:59, Ian Kent wrote:
> 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.
>   
---
     not required, but thought it might allow for more types of
tests/usages.
If it is really of limited or no benefit, I'm not gonna lose sleep.
> 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.
>   
I get that....this wasn't intended as an 'endpoint' just a way for those
not
implementing and using the calls to get a feel for the call.  It may
not serve
a useful purpose in this case, but some system calls have direct
user-utils that
are very useful.  The lack of a system util to manipulate the pty calls
forced
me to write a few-line 'C' prog just to make 1 call to approve
something.  Eventually switched to a more robust interface in perl.
> 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.
>   
----
  No basic testing that the kernel call is producing exactly what you are
expecting is needed, I take it.
>   
>> 	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 wasn't what I meant -- just that if you implement functionality in
a test prog, eventually you would be able to library-ize the call for other
purposes.  I got the impression th
> 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.
>   
----
    That sounds like a deficiency in the way mount tables are displayed.

Just like you can look at all net-io with a device name in column 0,
there's another directory where each device is a filename entry and by
looking at that
you can just look at the stats of that 1 file.

Block devices have the same type of all-or-single readouts as well.

So why not mounts?

I.e. why not subdirs for 'by-mountpoint', or by-device, or
whole-dev-vs.partition, or by UUID....like some things are listed
in /dev.  That would allow you to narrow in on the mount you want for
doing whatever.

The advantage of putting it in proc is that everyone easily benefits in a
portable, and easy to read interface, where-as binary-interfaces are what
make windows windows, with text interfaces on linux allowing for easy
prototyping and creative usages.

Just this one part -- of wanting a kernel call just to narrow scope
seems like a
perfect reason to add different ways of addressing mounts by different
keywords.



> Ian
>
>   


  parent reply	other threads:[~2019-05-22  4:28 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
2019-05-22  3:12             ` Ian Kent
2019-05-22  4:28             ` L A Walsh [this message]
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=5CE4CFEF.5020100@tlinx.org \
    --to=lkml@tlinx.org \
    --cc=kzak@redhat.com \
    --cc=raven@themaw.net \
    --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.