Charles Forsyth <[email protected]> wrote:
> As you'll have noticed, it isn't a great protocol as it stands. I don't
> think your option makes it worse.
Thanks for your perspective. I'm glad that my long-winded explanation
didn't obscure the basic logic too much. It makes sense for import to
be able to dial and attach to an exportfs -a -r listener, and right
now it can't. You mentioned someone was already carrying an
equivalent patch with the -m flag, and another user I spoke with
mentioned they had written their own exportfs server which addressed
this on the exportfs end. Since a few different users have run into
this and wanted to use the "authentication, no tree request" protocol
variant, it would be good I think if all users could connect to that
type of server using a standardized method. If the -m flag already
has some existing users, it might be a better choice than -z for this
option.
> Note that in your example
> import -z tcp!server!9876 somefiles /n/authedimport
> with the existing import you don't need to specify the (now unused)
> somefiles. If I write {import system /net} it sends "/net" as the tree by
> default.
> I think all you'd need to do to make the option tidier is to reject the
> case argc == 3 in the relevant switch if the option is set. Then you could
> write
> (changing the option letter):
> import -m tcp!server!9876 /n/authedimport
> which reads as import by mounting the 9P service on the given connection on
> the given mount point. It's otherwise a little strange to have an
> argument (your "somefiles") that's completely ignored.
I totally agree. In fact I was unclear about this. The way I wrote
it made it seem as if sending the unused parameter was mandatory - but
in fact, import already has this logic:
switch(argc) {
case 2:
mntpt = argv[1];
break;
case 3:
mntpt = argv[2];
So it is already the case that
import -m tcp!server!9876 /n/authedimport
would do the mount at the specified point. I wrote out the version
with the unnecessary parameter to try to clarify what what -z was
doing, but in practice you just write it exactly as you described.
Maybe the argc==3 case should be rejected just as a reminder to the
user that the tree request will not be sent.
Ben Kidwell
-mycroftiv