9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rbnsw-plan9@yahoo.com.au
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>,
	David Lukes <davelukes@mac.com>
Subject: Re: [9fans] RFS alternatives (Was: Living with Plan 9)
Date: Mon, 27 Jun 2011 10:07:15 -0700	[thread overview]
Message-ID: <1309194435.17968.YahooMailClassic@web30908.mail.mud.yahoo.com> (raw)


--- On Wed, 22/6/11, David Lukes <davelukes@mac.com> wrote:
>...
> I'm no RFS guru, thank deity, but I did RTFC once and "F"
> was apposite.
It took me a little time to figure out RTFC wasn't a remote file system ;-)
> 
> ioctl was handled by having the client "know" exactly what
> each ioctl "looked like", i.e. it only worked for known
> cases.
...

Thanks for pointing out the folly in my thinking. I was hoping for a user/administrators view of RFS but the under the hood perspective is welcome. I'd forgotten that the variable(!) trailing parameters of the ioctl are opaque at the system call level, i.e. their layouts are only known to the application program and device drivers.

So the best that can be done in a generic manner is to send ioctls only between systems with identical binary representations (possibly remapping major/minor device numbers).

Maybe if RFS had been more successful over NFS, (or Linus knew more about Plan 9) the Unix interface would have been fixed by now. I wonder if there is any level of acceptance amongst *nix kernel developers that this is a problem. I can think of schemes to fix this without having to modify every program that issues an ioctl - though that would be a good idea in the long run - /merely/ having to modify every device driver implementing ioctls to assist in the remote translation. While it might seem unfeasible to modify every device driver in this class to support this behaviour, the kernel interfaces change frequently so perhaps this might indeed be possible.

Speaking of device numbers, I was surprised that Plan 9 has a similar notion. However, they are only useful with kernel resident device numbers. Does Plan 9 have some other mechanism that allow one to identify the class of device/file server it belongs to?

In most cases, a name is good enough, but sometimes its not.

And speaking of opaqueness, while Plan 9 might use portable data representation, some interfaces are perhaps unnecessarily opaque in a different way. Consider the uart ctl file with its encoded string of device attributes. If each attribute used a separate file, with meaningful names, the parameters of the interface, although unfortunately not their range of values, would be available. Given that it is not, some other form of automated description is desirable, ideally accessible from the file system itself rather than requiring use of a library. While we have learned (been forced) to live with files that are bags of bytes, I think it would be better not to repeat this with interfaces too.

Oh, and it would be better if the uart device was consistent with the files in net with their separate data and ctl files, if one is going to rely on conventions they should be consistent. Despite the other faults of ioctl there's no doubt where the control interface of a device is.

Andrew



             reply	other threads:[~2011-06-27 17:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-27 17:07 rbnsw-plan9 [this message]
2011-06-27 17:20 ` ron minnich
2011-06-27 17:45   ` Jeff Sickel
2011-06-27 18:18     ` Skip Tavakkolian
2011-06-27 19:13       ` dexen deVries
2011-06-27 20:17         ` erik quanstrom
2011-06-27 21:23           ` dexen deVries
2011-06-30 15:31             ` Yaroslav
2011-06-27 18:26   ` Richard Miller
2011-06-27 20:50   ` [9fans] Four chances (was RFS alternatives (Was: Living with Plan 9)) Aharon Robbins
2011-06-27 17:24 ` [9fans] RFS alternatives (Was: Living with Plan 9) erik quanstrom
2011-06-30 17:11   ` rbnsw-plan9
2011-06-30 20:07     ` erik quanstrom
  -- strict thread matches above, loose matches on Subject: below --
2011-06-21 17:35 rbnsw-plan9
2011-06-21 22:42 ` dave.l
2011-06-22 15:16   ` Charles Forsyth
2011-06-11 19:26 rbnsw-plan9
2011-06-21 12:51 ` Eric Van Hensbergen

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=1309194435.17968.YahooMailClassic@web30908.mail.mud.yahoo.com \
    --to=rbnsw-plan9@yahoo.com.au \
    --cc=9fans@9fans.net \
    --cc=davelukes@mac.com \
    /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).