9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] nfs client and fstat
@ 2006-06-28  2:05 Eoghan Sherry
  2006-06-28 20:48 ` Russ Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Eoghan Sherry @ 2006-06-28  2:05 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

There is a problem with the nfs client when using fstat.
Suppose /n/share is a mounted nfs share.
dirstat("/n/share") works correctly returning "share" for
the name. However, dirfstat(open("/n/share", OREAD))
returns "???" for the name.

The problem appears to be how FidAux.name is used
in /sys/src/cmd/nfs.c:1248 to manage the file name.

I don't know enough to fix this problem and was wondering
if anyone else has come across it and could offer some
help.

Thanks a million,
eoghan


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] nfs client and fstat
  2006-06-28  2:05 [9fans] nfs client and fstat Eoghan Sherry
@ 2006-06-28 20:48 ` Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2006-06-28 20:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> There is a problem with the nfs client when using fstat.
> Suppose /n/share is a mounted nfs share.
> dirstat("/n/share") works correctly returning "share" for
> the name. However, dirfstat(open("/n/share", OREAD))
> returns "???" for the name.
>
> The problem appears to be how FidAux.name is used
> in /sys/src/cmd/nfs.c:1248 to manage the file name.
>
> I don't know enough to fix this problem and was wondering
> if anyone else has come across it and could offer some
> help.

The problem is in the mount driver, not in nfs.c.
You're asking for the name of the root, which maybe should
be / instead of ???, but doesn't really matter.  Dirstat knows
to rewrite the result using the name you used, but dirfstat
does not.  The fix goes in /sys/src/9/port/chan.c, I think.

Russ


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-28 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-28  2:05 [9fans] nfs client and fstat Eoghan Sherry
2006-06-28 20:48 ` Russ Cox

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).