* [9fans] Pathological 9P question.
@ 2003-08-04 22:58 Dan Cross
2003-08-04 23:39 ` Charles Forsyth
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Dan Cross @ 2003-08-04 22:58 UTC (permalink / raw)
To: 9fans
Here's a question about a pathological case. Read(5) says that a read
in a directory must have an offset of either 0, or the offset of the
previous read plus the number of bytes returned. Walk(5) says that a
walk to . (ie, a walk where nwnames == 0) and newfid != oldfid is
equivalent to cloning oldfid, and that both fids will point to the same
file. What is the expected behavior, then, if a read is executed in a
directory, the fid is cloned but not clunked, and then a read is
executed on the new fid using the appropriate offset for the old fid?
Should the read succeed or fail?
- Dan C.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] Pathological 9P question.
2003-08-04 22:58 [9fans] Pathological 9P question Dan Cross
@ 2003-08-04 23:39 ` Charles Forsyth
2003-08-04 23:53 ` rob pike, esq.
2003-08-05 3:34 ` jmk
2 siblings, 0 replies; 7+ messages in thread
From: Charles Forsyth @ 2003-08-04 23:39 UTC (permalink / raw)
To: 9fans
you can't walk (clone) an open fid.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] Pathological 9P question.
2003-08-04 22:58 [9fans] Pathological 9P question Dan Cross
2003-08-04 23:39 ` Charles Forsyth
@ 2003-08-04 23:53 ` rob pike, esq.
2003-08-05 0:11 ` Dan Cross
2003-08-05 3:34 ` jmk
2 siblings, 1 reply; 7+ messages in thread
From: rob pike, esq. @ 2003-08-04 23:53 UTC (permalink / raw)
To: 9fans
> Should the read succeed or fail?
the clone should fail. it is illegal to clone an open fid.
-rob
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] Pathological 9P question.
2003-08-04 23:53 ` rob pike, esq.
@ 2003-08-05 0:11 ` Dan Cross
2003-08-05 0:21 ` rob pike, esq.
0 siblings, 1 reply; 7+ messages in thread
From: Dan Cross @ 2003-08-05 0:11 UTC (permalink / raw)
To: 9fans
> > Should the read succeed or fail?
>
> the clone should fail. it is illegal to clone an open fid.
Oh. Yeah. I, uhh...I knew that, I was just testing you. Ahem.
Thanks to Rob and Charles for point this out. I wonder what the
rationale for the restriction is, however; I suppose I'm thinking about
Unix dup too much when I think of cloning. Probably an artifact of
thinking of fid's as being more like file descriptors than they really
are. I guess the idea of duping can be adequately implemented by the
client and is unnecessary in the protocol. Since we're minimalists,
it would therefore be illogical to include it there.
- Dan C.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] Pathological 9P question.
2003-08-05 0:11 ` Dan Cross
@ 2003-08-05 0:21 ` rob pike, esq.
0 siblings, 0 replies; 7+ messages in thread
From: rob pike, esq. @ 2003-08-05 0:21 UTC (permalink / raw)
To: 9fans
> I wonder what the
> rationale for the restriction is
it simplifies the implementation of servers, which can make
assumptions about the uniqueness of data structures, such
as caches, associated with open files.
-rob
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] Pathological 9P question.
2003-08-04 22:58 [9fans] Pathological 9P question Dan Cross
2003-08-04 23:39 ` Charles Forsyth
2003-08-04 23:53 ` rob pike, esq.
@ 2003-08-05 3:34 ` jmk
2003-08-05 4:01 ` Dan Cross
2 siblings, 1 reply; 7+ messages in thread
From: jmk @ 2003-08-05 3:34 UTC (permalink / raw)
To: 9fans
Version(5) is much more fun to obsess about.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] Pathological 9P question.
2003-08-05 3:34 ` jmk
@ 2003-08-05 4:01 ` Dan Cross
0 siblings, 0 replies; 7+ messages in thread
From: Dan Cross @ 2003-08-05 4:01 UTC (permalink / raw)
To: 9fans
I've been obsessing over most of them for the last few days. What's
*really* fun is thinking about all the concurrency issues associated
with asynchronous operations on the same files and fids and outstanding
requests....
- Dan C.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-08-05 4:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-04 22:58 [9fans] Pathological 9P question Dan Cross
2003-08-04 23:39 ` Charles Forsyth
2003-08-04 23:53 ` rob pike, esq.
2003-08-05 0:11 ` Dan Cross
2003-08-05 0:21 ` rob pike, esq.
2003-08-05 3:34 ` jmk
2003-08-05 4:01 ` Dan Cross
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).