9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Roman Shaposhnick vugluskr@unicorn.math.spbu.ru
Subject: [9fans] Re: 9p question
Date: Mon, 13 Mar 2000 12:01:18 +0000	[thread overview]
Message-ID: <20000313120118.sb9TXtL1v-OHc-4ClKlGPC-NgJjXqht2yb3LoiENExE@z> (raw)

On Fri, 10 Mar 2000 11:24:57 GMT, forsyth@caldo.demon.co.uk wrote:
>>>>>>I definitely can not understand why openness is persistent property in the
>>>>>>sense that when I clone the open fid the copy happens to be open too.
>>>>
>>>>clone(5) notes that ``The fid [to be cloned]... must not have been
>>>>opened for I/O by an open or create message''.
>
>>>  Well, I certainly can read man page. I ask why there is such limitation,
>>>not where and how it is described. Sorry, but I would like to discuss bare
>>>9P ( see my previous letter ).
>
>you asked why openness is persistent across clone, and i simply observed that it is not persistent and cannot be,
>because clone is expressly prohibited on an already open fid.  it therefore isn't true
>that when you `clone the open fid the copy happens to be open too'.

 No, may be it isn't true, but it isn't false either. I can not speak with
real P9 server for now, but u9fs allows me to clone open fids. Please see
the following:

>> Tstat tag 3 fid 1
<< Rstat tag 3 fid 1 + dir
>> Topen tag 4 fid 1 mode 0x0
<< Ropen tag 4 fid 1 qid 0x81000002.0x38788ddd
>> Tclone tag 5 fid 1 newfid 2
<< Rclone tag 5 fid 1

That's why I asked question about all that stuff.


>it seems you were really asking: why can't i clone an open fid?
>here is my view (not having actually designed the thing).
>
>the operation of Topen, in some file servers, leads to the creation of some server-side
>state (eg, the state implied by a file descriptor opened in an underlying operating system,
>in the case of u9fs, or as another example, the state created for an open directory to
>permit reading it), and that state might not be easily cloned, or not able to be cloned at all
>(what does it mean to `clone' a file descriptor's state in unix or a file handle's state in Nt?).
>by contrast, the current Tclone clones state that the server can control
>and understand completely (eg, local data structures).
>it's hard enough trying to implement some of the operations as it is!

 I believe, that this limitation is a Plan 9 issue not 9P. Something
like seek(2) on directories, that is possible in 9P and is forbidden in
Plan 9 due to the reasons mentioned here. That's my speculations, but
since gurus are not with us and it seems that they are not
interested we can not know for certain. :)

Thanks,
Roman.




             reply	other threads:[~2000-03-13 12:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-13 12:01 Roman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-03-16 14:05 presotto
2000-03-14 14:51 forsyth
2000-03-13  9:28 Douglas
2000-03-11 15:00 rob
2000-03-11  9:53 Vladimir
2000-03-10 11:02 forsyth
2000-03-10  9:23 Roman
2000-03-10  9:23 David
2000-03-09 19:04 forsyth
2000-03-09 18:10 Roman
2000-03-09 18:05 Roman
2000-03-09 15:33 presotto
2000-03-09 14:44 Roman
2000-03-09 14:21 Roman
2000-03-09 13:50 rob
2000-03-09 13:18 presotto
2000-03-09 10:50 forsyth
2000-03-09 10:39 forsyth
2000-03-09 10:02 Douglas
2000-03-09  9:26 Roman
2000-03-07  9:32 David
2000-02-28 18:07 rob

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=20000313120118.sb9TXtL1v-OHc-4ClKlGPC-NgJjXqht2yb3LoiENExE@z \
    --to=9fans@9fans.net \
    /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).