Re: [9fans] SYSTOR 2009---The Israeli Experimental Systems Conference

2009-01-22 Thread Akshat Kumar
which homie in the hood is going to represent?

yo
ak



Re: [9fans] SYSTOR 2009---The Israeli Experimental Systems Conference

2009-01-22 Thread John Waters
I wonder how much flack I would get from Israeli passport control for
the stamps in my passport. :)

On Thu, Jan 22, 2009 at 1:26 PM, Akshat Kumar
aku...@mail.nanosouffle.net wrote:
 which homie in the hood is going to represent?

 yo
 ak





Re: [9fans] SYSTOR 2009---The Israeli Experimental Systems Conference

2009-01-22 Thread ron minnich
I don't know but that's a good group of people on the committee. I
expect they'd be open to more than the usual how I got linux to be
power aware type papers ...

ron



Re: [9fans] SYSTOR 2009---The Israeli Experimental Systems

2009-01-22 Thread lucio
 I wonder how much flack I would get from Israeli passport control for
 the stamps in my passport. :)

What makes you think you'll be allowed back into those countries after
visiting Israel?  :-)

++L




Re: [9fans] SYSTOR 2009---The Israeli Experimental Systems

2009-01-22 Thread Rodolfo kix García
If I remember, when you visit Israel, they put an additional paper in your
passport. This paper is removed when you leave the country. Then ... your
passport do not have any stamp of Israel ... and you will not have
problems visit other countries.

Saludos,
kix.


 I wonder how much flack I would get from Israeli passport control for
 the stamps in my passport. :)

 What makes you think you'll be allowed back into those countries after
 visiting Israel?  :-)

 ++L





-- 
Rodolfo García AKA kix
http://www.kix.es/
EA4ERH (@IN80ER)




[9fans] file creation time

2009-01-22 Thread lucio
Does Plan 9 really not provide for file creation?

typedef
struct Dir {
/* system-modified data */
ushort  type;   /* server type */
uintdev;/* server subtype */
/* file data */
Qid qid;/* unique id from server */
ulong   mode;   /* permissions */
ulong   atime;  /* last read time */
ulong   mtime;  /* last write time */
vlong   length; /* file length */
char*name;  /* last element of path */
char*uid;   /* owner name */
char*gid;   /* group name */
char*muid;  /* last modifier name */
} Dir;

It's been a long time, have I asked this already?

++L




Re: [9fans] file creation time

2009-01-22 Thread lucio
 use the dump, luke. ☺

If there was an easy, foolproof way to scan the dump by filename, I
presume I could search for the earliest instance and consider that the
time of creation.  Not entirely viable, is it?

I do wonder why this field was sacrificed in the file system(s) and
9P*?

Or am I dreaming and the time of creation is just a figment of my
imagination?

++L

PS: I'm sure your reply was in jest.  So, largely, is my query.




Re: [9fans] file creation time

2009-01-22 Thread andrey mirtchovski
On Thu, Jan 22, 2009 at 10:50 AM,  lu...@proxima.alt.za wrote:
 use the dump, luke. ☺

 If there was an easy, foolproof way to scan the dump by filename, I
 presume I could search for the earliest instance and consider that the
 time of creation.  Not entirely viable, is it?


history(1)

http://plan9.bell-labs.com/magic/man2html?man=historysect=1



Re: [9fans] file creation time

2009-01-22 Thread erik quanstrom
On Thu Jan 22 12:54:14 EST 2009, lu...@proxima.alt.za wrote:
  use the dump, luke. ☺
 
 If there was an easy, foolproof way to scan the dump by filename, I
 presume I could search for the earliest instance and consider that the
 time of creation.  Not entirely viable, is it?

it's hard to give a good answer, since i don't
know what the goal is.

 I do wonder why this field was sacrificed in the file system(s) and
 9P*?
 
 Or am I dreaming and the time of creation is just a figment of my
 imagination?

of course on a worm filesystem, you could say that each
time a file is modified after it has made it to the worm, it
becomes a brand new file.  though the qid.path doesn't
track this view.  the create time would then differ
from the mtime by as most the time between dumps.

andrey suggests

 history(1)

history doesn't give creation times.  it gives the last mtime
before the first dump of the file.  the file could be deleted
and recreated many times and you'd never know.  (unless
you were to peek at the qid.path.)

but then again, history might be exactly what you're
looking for.  it usually is for me.

- erik



Re: [9fans] file creation time

2009-01-22 Thread lucio
 useful or not, traditional unix ctime never gave the creation time
 anyway - it gave inode modification time, which isn't the
 same thing at all: it's updated when you do a chmod.

Well, that is understandable, if contrary to the principle of least
astonishment.  Thank you for that gem, I would never have picked it
up without having it pointed out to me.

++L




Re: [9fans] file creation time

2009-01-22 Thread erik quanstrom
On Thu Jan 22 14:33:05 EST 2009, 9f...@hamnavoe.com wrote:
  will the real creation time please stand up.
 
 October 23, 4004 BC.

so when we add 8-byte times to 9p2010 Tstat
and Wstat, we can add a constant ctime field of
-188466825600?  or should that just be hardcoded?

- erik



Re: [9fans] file creation time

2009-01-22 Thread Charles Forsyth
I would never have picked it up without having it pointed out to me.

to be fair, in one of the system include files it was commented as
ino.h:  time_t  di_ctime;   /* time created */
but it was only a comment.  stat(2) was more accurate.



[9fans] fun question

2009-01-22 Thread ron minnich
I ask this every time I hit this piece of code, I think. But what the heck:

  if(seed - 0)
seed = seed + m_31;

what's wrong with this code?

ron



Re: [9fans] fun question

2009-01-22 Thread erik quanstrom
On Thu Jan 22 15:55:09 EST 2009, rminn...@gmail.com wrote:
 I ask this every time I hit this piece of code, I think. But what the heck:
 
   if(seed - 0)
 seed = seed + m_31;
 
 what's wrong with this code?

supposing the code does what it is supposed
to on some machines, i would guess that this
could be a problem for sign-magnitude or one's-comp.
machines, since 0 and -0 are different.  if that's
the case, one would guess that the object is to clear
sign bit and -0 is the failure case.

then again, that's a very wild guess and one
would assume that sign = -sign would be
better.

-0 is a strange construction and the spacing
is misleading. it's interesting that atoi(2) and
the differ on - 0.

- erik



Re: [9fans] fun question

2009-01-22 Thread Russ Cox
On Thu, Jan 22, 2009 at 12:53 PM, ron minnich rminn...@gmail.com wrote:
 I ask this every time I hit this piece of code, I think. But what the heck:

  if(seed - 0)
seed = seed + m_31;

 what's wrong with this code?

- is a unary operator.

russ



Re: [9fans] fun question

2009-01-22 Thread Pietro Gagliardi

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Jan 22, 2009, at 5:01 PM, Russ Cox wrote:

- is a unary operator.



okay, what does it do? (unless you meant - in C++)


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkl47zYACgkQuv7AVNQDs+wr7ACgi7QtQv4m4TweJlyzLFSHUs41
ZCYAnR6CqXQp69/g99pUkI0W789SRxXF
=s97M
-END PGP SIGNATURE-



Re: [9fans] fun question

2009-01-22 Thread Russ Cox
 - is a unary operator.

 okay, what does it do? (unless you meant - in C++)

it receives from a channel.

russ



Re: [9fans] fun question

2009-01-22 Thread erik quanstrom
On Thu Jan 22 17:55:55 EST 2009, r...@swtch.com wrote:
  - is a unary operator.
 
  okay, what does it do? (unless you meant - in C++)
 
 it receives from a channel.

i assumed that ron was talking about c.
in c, - 0 tokenizes as , -, and 0.
- is taken to be a unary operator on 0.

even gcc does this correctly:

; cat  x.c
#include u.h
#include libc.h

void
x(int seed)
{
int m_31;

m_31 = 131;
if(seed - 0)
seed = seed + m_31;
print(seed %d\n, seed);
}

void
main(void)
{
x(-5);
exits();
}
eot; 9c x.c
; 9l x.o
; ./a.out
seed -2147483648

- erik



Re: [9fans] fun question

2009-01-22 Thread ron minnich
Erik got it. That code originally was written for a 1s complement
machine, the CDC 7200 I believe. I get a kick out of it every time I
see something and remember machines with + and - 0 :-)

ron



[9fans] srv funny?

2009-01-22 Thread Nathaniel W Filardo
I don't undrestand what's going on here:

 term% 9fs sources
 post...
 term% ls -l /n/sources
 d-rwxrwxr-x M 38 9grid  9grid 0 Oct 20  2005 /n/sources/9grid
 ...
 
 term% cpu -h phlogiston.acm.jhu.edu
 cpu% mount -n /mnt/term/srv/sources /n/sources
 
 !Adding key: dom=outside.plan9.bell-labs.com proto=p9sk1
 user[nwf]: 

Why is the terminal able to use /srv/sources to mount /n/sources but the cpu
server isn't able to use exportfs's access to /srv/sources to do the same?

If it helps, I'm running on 9vx for term% and a real Plan 9 system for
cpu%.  My terminal's 9fs is passing -n to srv, too, just to be clear:
 case sources
  srv -nq tcp!sources.cs.bell-labs.com sources /n/sources

Thanks.
--nwf;


pgp69qqWJnpUX.pgp
Description: PGP signature


Re: [9fans] srv funny?

2009-01-22 Thread Russ Cox
 cpu% mount -n /mnt/term/srv/sources /n/sources

 !Adding key: dom=outside.plan9.bell-labs.com proto=p9sk1
 user[nwf]:

 Why is the terminal able to use /srv/sources to mount /n/sources but the cpu
 server isn't able to use exportfs's access to /srv/sources to do the same?

mount -n doesn't ask for keys,
despite what this transcript looks like.
If you run ps on both systems (in other windows),
I bet you will find that the /factotum -g process
asking for the key is running on your terminal,
not the cpu server.

When the cpu server mounts /mnt/term/srv/sources,
it sends Tread and Twrite requests for /srv/sources
to the exportfs serving /mnt/term.
That's a 9P conversation inside a 9P conversation,
i.e. the payloads of the Tread and Rwrite messages
are themselves 9P messages.

Clumsy fact #1:
After an fd has been mounted, ordinary read and write
system calls are not allowed on it: the kernel owns the
9P connection now.  Not doing this would require serious
effort in the kernel, since user-level reads and writes
would interfere with the kernel's reads and writes.

The obvious implementation of Tread/Twrite in exportfs--
call the read and write system calls on the underlying fd--
can't work for exporting /srv/sources, because the kernel owns
the 9P connection.  Instead, exportfs mounts /srv/sources
onto /mnt/exportfs/1 and then invokes itself recursively to
serve /mnt/exportfs/1 onto a freshly created pipe.  Then it
translates the Tread/Twrite messages for /srv/sources into
read and write system calls on that pipe.

Clumsy fact #2:
9P is really intended for two use cases: either the server
never requires authentication (in which case it replies to
Tauth with an Rerror), or it always does (in which case it
replies to Tauth with Rauth and you authenticate on that fid).
Sources is an attempt to have it both ways: if you don't offer
to authenticate (don't bother sending a Tauth), sources won't
ask you to, but if you do offer, you have to follow through.
In contrast, when you offer to authenticate to, say, the plumber,
it just waves you off.  In hindsight, a better way to do the
dual-mode sources would have been to announce on two
different ports, one with authentication and one without.
But what's done is done.

So...

When cpu's exportfs mounts /srv/sources in order to start
serving /mnt/term/srv/sources, it uses amount(2) (just like mount
does without -n), which offers to authenticate and then causes
the prompt.

The -n flag to srv only affects the mount that srv does,
not future mounts.

The easiest thing to do is pretend this didn't happen and
just mount sources directly from phlogiston.  If that machine
doesn't have network connectivity to sources, you could

  bind /mnt/term/net /net; 9fs sources

Russ



Re: [9fans] fun question

2009-01-22 Thread Pietro Gagliardi

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Jan 22, 2009, at 6:01 PM, erik quanstrom wrote:


i assumed that ron was talking about c.


Yeah, that's what I thought. Sorry, Russ.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkl5E1IACgkQuv7AVNQDs+xctgCggzbkwZ8EpuuEPu7e5kgItuC5
vDgAnisvoB6CWTOrPaXQ04jqyRL2kuJV
=Yw+A
-END PGP SIGNATURE-



[9fans] anyone tried fossil on p9p?

2009-01-22 Thread Anthony Sorace
Has anyone gotten fossil (with or without venti) working on p9p, or
tried and failed?

I've been playing around with a variety of 9vx configurations and want
to try booting it off a p9p-hosted fossil (on the same physical box).
That's the next project.