Re: [9fans] wstat and atomic directory change
you can consider doing it out of band; e.g. a new fossil console command. On Wed, Feb 4, 2015 at 6:30 AM Giacomo Tesio giac...@tesio.it wrote: And unfortunately I cannot figure out any alternative, either. :-( An interesting point is: why directory entries can be read but cannot be written? I mean we use Tcreate to create a new file in a dir, while to be uniform with files, we should use a Twrite, appending a corresponding stat structure at the end of a directory entry. However this solution probably has not been adopted to enable safe concurrency in the file creation and removal. However this asymmetry shows that directories cannot be (pratically) handled in the same way of files. Giacomo 2015-02-04 15:06 GMT+01:00 erik quanstrom quans...@quanstro.net: You are right. But since protocol customizations goes against that same ideal, what's the plan9 way of dealing with a feature X (in this specific case atomic file moves)? this requires delving into the namespace to tell that the directories are still under the same mount, and some non-uniform operations. Good point. But thus, what are the alternatives? i wasn't holding out. i don't have any suggestions. - erik
Re: [9fans] wstat and atomic directory change
2015-02-04 4:51 GMT+01:00 erik quanstrom quans...@quanstro.net: On Tue Feb 3 01:01:02 PST 2015, st...@quintile.net wrote: the control file idea is a neat way of doing atomic moves. control files are a good way of dealing with all kinds of exceptional behavior. but ... to be fair, this goes against the unix ideal of having uniform file operations. You are right. But since protocol customizations goes against that same ideal, what's the plan9 way of dealing with a feature X (in this specific case atomic file moves)? this requires delving into the namespace to tell that the directories are still under the same mount, and some non-uniform operations. Good point. But thus, what are the alternatives? Giacomo
Re: [9fans] wstat and atomic directory change
you can consider doing it out of band; e.g. a new fossil console command. On Wed, Feb 4, 2015 at 6:30 AM Giacomo Tesio giac...@tesio.it wrote: And unfortunately I cannot figure out any alternative, either. :-( An interesting point is: why directory entries can be read but cannot be written? I mean we use Tcreate to create a new file in a dir, while to be uniform with files, we should use a Twrite, appending a corresponding stat structure at the end of a directory entry. However this solution probably has not been adopted to enable safe concurrency in the file creation and removal. However this asymmetry shows that directories cannot be (pratically) handled in the same way of files. right. directories are not the same as files. you're right that reading a directory is useless. - erik
[9fans] GUI for navgating the file tree
Hi 9fans I'm writing a little GUI for file system navigation … it's all but finished, but clicking on directories works, so if somebody would like to try, I'd be delighted! If you have any comments, on the program, on the code, etc. let me know. If you have hg, just hg clone https://bitbucket.org/fpz/nav otherwise download https://bitbucket.org/fpz/nav/get/tip.tar.gz - Fritz
Re: [9fans] GUI for navgating the file tree
On Wed, Feb 4, 2015 at 3:27 PM, Friedrich Psiorz f.psi...@gmx.de wrote: Hi 9fans I'm writing a little GUI for file system navigation … it's all but finished, but clicking on directories works, so if somebody would like to try, I'd be delighted! If you have any comments, on the program, on the code, etc. let me know. If you have hg, just hg clone https://bitbucket.org/fpz/nav otherwise download https://bitbucket.org/fpz/nav/get/tip.tar.gz - Fritz Could someone post a screenshot? This is something I've been waiting for awhile now in the Plan 9 universe.
Re: [9fans] wstat and atomic directory change
Useless? No I did not mean this. (and sorry, I wasn't in any way sarcastic, I'm just trying to understand 9p's design a bit deeper) I mean that to realize a truly uniform interface, directories should be writable with Twrite, so that we would not need messages like Tcreate and Tremove (and possibly Twstat) and Tstat would just be an efficient shortcut (like it actually already is, since we can obtain the same info reading the parent directory). We could add a file by appending a stat entry to the parent directory and we could remove it by removing such entry. We could modify permissions, names and so on overwriting the entry. The problem would be: how to do such basic operations atomically and concurrently? That's why (I suppose) we have Tcreate, Tremove and Twstat. For praticality. But why we don't have Tmove for example? Probably the answer is in the distributed nature of Plan 9: as you said, namespaces would be at odds with such a message, complicating the library functions. However having to read and write a 10 GB file one msize after the other just to change its directory looks a bit costly, if both the origin and the destinations are in the same phisical disk. Moreover (if I've understood properly the protocol) to move a 10 GB file between two directories on a disk, you should have 10 GB free on that disk! All this reflections arise from the search for an orthodox way to change the tree structure of a synthetic filesystem. Moving large real files is not my actual issue here. I'm wondering for a synthetic filesystem in which, when you move a folder in a special directory, something magic happens. As far as I can see, it is not possible with a 9p2000 fileservice, is it? Giacomo 2015-02-04 20:23 GMT+01:00 erik quanstrom quans...@quanstro.net: you can consider doing it out of band; e.g. a new fossil console command. On Wed, Feb 4, 2015 at 6:30 AM Giacomo Tesio giac...@tesio.it wrote: And unfortunately I cannot figure out any alternative, either. :-( An interesting point is: why directory entries can be read but cannot be written? I mean we use Tcreate to create a new file in a dir, while to be uniform with files, we should use a Twrite, appending a corresponding stat structure at the end of a directory entry. However this solution probably has not been adopted to enable safe concurrency in the file creation and removal. However this asymmetry shows that directories cannot be (pratically) handled in the same way of files. right. directories are not the same as files. you're right that reading a directory is useless. - erik
Re: [9fans] GUI for navgating the file tree
Is this an acme fork? khm
Re: [9fans] adm
Richard Miller 9fans at hamnavoe.com writes: I need to access to /adm/timezone to change the timezone. How do I log as user adm ? To change /adm/timezone you only need to be part of group adm. If you're logged in (ie booted) as glenda, just add glenda temporarily to the group using the fossil console (as current hostowner, glenda has authority over the local fossil). % echo uname adm +glenda /srv/fscons % ... do stuff with /adm/timezone % echo uname adm -glenda /srv/fscons Thank's a lot. I works pretty fine, but I need to learn more about fscons to understand why it works.
Re: [9fans] GUI for navgating the file tree
:) no. Am 04.02.2015 um 22:59 schrieb Kurt H Maier: Is this an acme fork? khm
Re: [9fans] adm user on plan9 raspberry pi
On 2015-02-04 05:42:12 +, Bakul Shah said: On Wed, 04 Feb 2015 01:17:00 GMT christophe DAMAS christophe.da...@gmail.com wrote: I need to access to /adm/timezone to change the timezone. How do I log as user adm ? I use the standard plan9.iso image downloaded form ATT web site. Do you mean 9pi.img? I have not set any password. Glenda is automatically logged in. You need to change cmdline.txt on the boot (DOS) partition to not automatically log in as glenda. % c:# this mounts the dos partition % cd /n/c % cp cmdline-term.txt cmdline.txt % fshalt# wait till it says done halting ^T^Tr # reboot Now it will prompt you for a user name. Use sys or some other name from the line starting with adm: in /adm/users. I'm new to plan9. Read ATT docs, but I have not understand how to set password, and how to log as another user? Just reboot and log in as another user. See the plan9 wiki for a more elaborate setup. You're right I mean 9pi.img (Thanks a lot to Richard Miller) Thanks for your advice I can now select user at boot.
Re: [9fans] adm user on plan9 raspberry pi
On 4 February 2015 at 10:52, Richard Miller 9f...@hamnavoe.com wrote: I need to access to /adm/timezone to change the timezone. How do I log as user adm ? To change /adm/timezone you only need to be part of group adm. If you're logged in (ie booted) as glenda, just add glenda temporarily to the group using the fossil console (as current hostowner, glenda has authority over the local fossil). % echo uname adm +glenda /srv/fscons % ... do stuff with /adm/timezone % echo uname adm -glenda /srv/fscons It's interesting I was solving the same question a couple of days ago. (I was installing 9atom.) I think R. Miller's answer is closest to what christophe.DAMAS needed. (On 9atom one is asked during booting for a user, so there it can be enough to really 'just log in as adm'.) It's a pitty this is not as clear as it should be on the wiki. Anyhow; a related question that came across my mind: How does a user list all groups they is in? (to list all users in a group one can uname group on the fossil console) and What is the difference between con /srv/fscons and con -l /srv/fscons ? Thanks Ruda
Re: [9fans] adm user on plan9 raspberry pi
To change /adm/timezone you only need to be part of group adm. If you're logged in (ie booted) as glenda, just add glenda temporarily to the group using the fossil console (as current hostowner, glenda has authority over the local fossil). On my server(s), 9fs fossil mounts fossil -AWP on /n/fossil. That allows me to really fool around. I haven't wrecked any servers yet and venti is always there as a catch net anyway. Lucio.
Re: [9fans] wstat and atomic directory change
You are right. But since protocol customizations goes against that same ideal, what's the plan9 way of dealing with a feature X (in this specific case atomic file moves)? this requires delving into the namespace to tell that the directories are still under the same mount, and some non-uniform operations. Good point. But thus, what are the alternatives? i wasn't holding out. i don't have any suggestions. - erik
Re: [9fans] wstat and atomic directory change
And unfortunately I cannot figure out any alternative, either. :-( An interesting point is: why directory entries can be read but cannot be written? I mean we use Tcreate to create a new file in a dir, while to be uniform with files, we should use a Twrite, appending a corresponding stat structure at the end of a directory entry. However this solution probably has not been adopted to enable safe concurrency in the file creation and removal. However this asymmetry shows that directories cannot be (pratically) handled in the same way of files. Giacomo 2015-02-04 15:06 GMT+01:00 erik quanstrom quans...@quanstro.net: You are right. But since protocol customizations goes against that same ideal, what's the plan9 way of dealing with a feature X (in this specific case atomic file moves)? this requires delving into the namespace to tell that the directories are still under the same mount, and some non-uniform operations. Good point. But thus, what are the alternatives? i wasn't holding out. i don't have any suggestions. - erik
Re: [9fans] [Off topic] Raspberry Pi 2 gets the evil OS
2015-02-04 8:41 GMT+01:00 arn...@skeeve.com: Raspberry Pi 2 gets the evil OS Raspberry Pi has always supported Linux.
Re: [9fans] wstat and atomic directory change
But why we don't have Tmove for example? Because its semantics are much, much more complex and the users need to be aware of the difference. Imagine a Tmove that transfers your entire disk contents to the cloud: would you like it to be perceived as trivial? What happens if you interrupt it? Worse, what happens if you can't interrupt it? Lucio.
Re: [9fans] wstat and atomic directory change
I'm wondering for a synthetic filesystem in which, when you move a folder in a special directory, something magic happens. Magic is overrated. Lucio.
Re: [9fans] wstat and atomic directory change
But why we don't have Tmove for example? http://9front.org/img/9tmove01.png sl