9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] What do I need for a small 9P2000 server @ Linux ?
@ 2007-06-28 13:31 Enrico Weigelt
  2007-06-28 14:28 ` Eric Van Hensbergen
  0 siblings, 1 reply; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-28 13:31 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


Hi folks,

I'd like to write some small 9P2000 servers on Linux.
What do I need for that ?


Thx
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 13:31 [9fans] What do I need for a small 9P2000 server @ Linux ? Enrico Weigelt
@ 2007-06-28 14:28 ` Eric Van Hensbergen
  2007-06-28 15:20   ` ron minnich
                     ` (2 more replies)
  0 siblings, 3 replies; 50+ messages in thread
From: Eric Van Hensbergen @ 2007-06-28 14:28 UTC (permalink / raw)
  To: weigelt, Fans of the OS Plan 9 from Bell Labs

Uriel maintains a web page with all the different options for various
languages.  One place to look is at npfs/spfs which is maintained as a
sourceforge project.  There are some incomplete developer works
articles on using it via my blog (http://www.graverobber.org)

            -eric


On 6/28/07, Enrico Weigelt <weigelt@metux.de> wrote:
>
> Hi folks,
>
> I'd like to write some small 9P2000 servers on Linux.
> What do I need for that ?
>
>
> Thx
> --
> ---------------------------------------------------------------------
>  Enrico Weigelt    ==   metux IT service - http://www.metux.de/
> ---------------------------------------------------------------------
>  Please visit the OpenSource QM Taskforce:
>         http://wiki.metux.de/public/OpenSource_QM_Taskforce
>  Patches / Fixes for a lot dozens of packages in dozens of versions:
>         http://patches.metux.de/
> ---------------------------------------------------------------------
>


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 14:28 ` Eric Van Hensbergen
@ 2007-06-28 15:20   ` ron minnich
  2007-06-28 17:36     ` Enrico Weigelt
  2007-06-28 16:51   ` Uriel
  2007-06-29  0:56   ` Roman Shaposhnik
  2 siblings, 1 reply; 50+ messages in thread
From: ron minnich @ 2007-06-28 15:20 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I've written servers with the spfs library and found it very, very easy.

ron


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 14:28 ` Eric Van Hensbergen
  2007-06-28 15:20   ` ron minnich
@ 2007-06-28 16:51   ` Uriel
  2007-07-11 18:16     ` Eric Van Hensbergen
  2007-06-29  0:56   ` Roman Shaposhnik
  2 siblings, 1 reply; 50+ messages in thread
From: Uriel @ 2007-06-28 16:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

See http://9p.cat-v.org

I'm still waiting for some kind of npfs/spfs release I can link to
from there, last I checked spfs was only accessible as some random
tree in the v9fs cvs.

uriel

On 6/28/07, Eric Van Hensbergen <ericvh@gmail.com> wrote:
> Uriel maintains a web page with all the different options for various
> languages.  One place to look is at npfs/spfs which is maintained as a
> sourceforge project.  There are some incomplete developer works
> articles on using it via my blog (http://www.graverobber.org)
>
>             -eric
>
>
> On 6/28/07, Enrico Weigelt <weigelt@metux.de> wrote:
> >
> > Hi folks,
> >
> > I'd like to write some small 9P2000 servers on Linux.
> > What do I need for that ?
> >
> >
> > Thx
> > --
> > ---------------------------------------------------------------------
> >  Enrico Weigelt    ==   metux IT service - http://www.metux.de/
> > ---------------------------------------------------------------------
> >  Please visit the OpenSource QM Taskforce:
> >         http://wiki.metux.de/public/OpenSource_QM_Taskforce
> >  Patches / Fixes for a lot dozens of packages in dozens of versions:
> >         http://patches.metux.de/
> > ---------------------------------------------------------------------
> >
>


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 15:20   ` ron minnich
@ 2007-06-28 17:36     ` Enrico Weigelt
  2007-06-28 17:40       ` erik quanstrom
                         ` (2 more replies)
  0 siblings, 3 replies; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-28 17:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


Okay folks, grabbed npfs and spfs from CVS.

Both build fine. ufs and npfs seem to work, but I didn't yet
understand how the other servers, ie. ramfs2, work.

BTW, found some ugly bugs: if the server terminates while still
mounted, restarting fails. strace shows socket is still in use.
I remember there was an socket option to prevent that behaviour.

The 9p driver in linux-2.6.19 (which currently is the latest
stable in Gentoo) is some bit broken. First I had to fix the
init function to abort if the result code if the called functions
(ie. register_filesystem) is non-zero instead of zero ;o
And if you're mounting the npfs or u9fs server and chdir into
the mountpoint's subdir under the mountpoint itself, the process
will hang (forever?). Obviously an recursion problem.


cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 17:36     ` Enrico Weigelt
@ 2007-06-28 17:40       ` erik quanstrom
  2007-06-28 17:49       ` Kris Maglione
  2007-06-29 12:37       ` Eric Van Hensbergen
  2 siblings, 0 replies; 50+ messages in thread
From: erik quanstrom @ 2007-06-28 17:40 UTC (permalink / raw)
  To: weigelt, 9fans

you might mention these problems to the v9fs-developer list.
i believe it's on sourceforge.

- erik


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 17:36     ` Enrico Weigelt
  2007-06-28 17:40       ` erik quanstrom
@ 2007-06-28 17:49       ` Kris Maglione
  2007-06-28 18:45         ` Enrico Weigelt
                           ` (2 more replies)
  2007-06-29 12:37       ` Eric Van Hensbergen
  2 siblings, 3 replies; 50+ messages in thread
From: Kris Maglione @ 2007-06-28 17:49 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

On Thu, Jun 28, 2007 at 07:36:29PM +0200, Enrico Weigelt wrote:
>Okay folks, grabbed npfs and spfs from CVS. 

Might I suggest you try libixp instead of npfs? Aside from .u 
and auth, it does nearly everything that spfs does, only in 
about 1/10th the size, and with much clearer code, in my 
opinion. The API is based largely on lib9p. If you need 
something that it doesn't have (threading support?), it should 
be easy to add (I'd even be willing to add threading support, if 
you tell me the threading API to use).

http://www.suckless.org/wiki/libs/libixp

-- 
Kris Maglione

Show me a person who's never made a mistake and I'll
show you somebody who's never achieved much.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 17:49       ` Kris Maglione
@ 2007-06-28 18:45         ` Enrico Weigelt
  2007-06-28 18:49           ` Kris Maglione
  2007-06-28 18:52         ` ron minnich
  2007-06-29  1:05         ` Roman Shaposhnik
  2 siblings, 1 reply; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-28 18:45 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* Kris Maglione <bsdaemon@comcast.net> wrote:

Hi,

> Might I suggest you try libixp instead of npfs? Aside from .u
> and auth, it does nearly everything that spfs does, only in
> about 1/10th the size, and with much clearer code, in my
> opinion. The API is based largely on lib9p.

Ok, thx, I'll have a look at it.
For local-only use I could live w/o authenticaton, but I
intend to run it remotely later. For example also I'm planning
to move Mozilla's mail handling to 9p2000 and allow direct
9p connections to the mailspool via internet. At this point
authentication and encrytion is mandatory.

> If you need something that it doesn't have (threading support?),
> it should  be easy to add (I'd even be willing to add threading
> support, if you tell me the threading API to use).

Threading support will be necessary, since many of the apps
I intend to work on are MT. IMHO we can assume pthreads on
every target system.

Another key point is licensing. I need something that's
compatible with all the othes on linking. LGPL would fit
nice, IMHO.


Ah, do you have an little example for the client ?


cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 18:45         ` Enrico Weigelt
@ 2007-06-28 18:49           ` Kris Maglione
  2007-06-28 19:01             ` Enrico Weigelt
  0 siblings, 1 reply; 50+ messages in thread
From: Kris Maglione @ 2007-06-28 18:49 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

On Thu, Jun 28, 2007 at 08:45:22PM +0200, Enrico Weigelt wrote:
>Another key point is licensing. I need something that's 
>compatible with all the othes on linking. LGPL would fit
>nice, IMHO.

All of my code is either MIT licensed or in the Public Domain.

>Ah, do you have an little example for the client ?

libixp comes with a client, cmd/ixpc.c

-- 
Kris Maglione

Virtue is its own punishment.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 17:49       ` Kris Maglione
  2007-06-28 18:45         ` Enrico Weigelt
@ 2007-06-28 18:52         ` ron minnich
  2007-06-28 18:57           ` Kris Maglione
  2007-06-29  1:05         ` Roman Shaposhnik
  2 siblings, 1 reply; 50+ messages in thread
From: ron minnich @ 2007-06-28 18:52 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

What's this mean?

"libixp lacks lib9p's file trees."


I assume it does not mean that mkdir won't work.

ron


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 18:52         ` ron minnich
@ 2007-06-28 18:57           ` Kris Maglione
  2007-06-28 19:03             ` Enrico Weigelt
  0 siblings, 1 reply; 50+ messages in thread
From: Kris Maglione @ 2007-06-28 18:57 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

On Thu, Jun 28, 2007 at 11:52:07AM -0700, ron minnich wrote:
> "libixp lacks lib9p's file trees."

It means that it doesn't have 9pfile(2). mkdir works, but you 
have to manage the tree yourself.

-- 
Kris Maglione

You will remember that you forgot to take out the trash
when the garbage truck is two doors away.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 18:49           ` Kris Maglione
@ 2007-06-28 19:01             ` Enrico Weigelt
  2007-06-28 19:10               ` Kris Maglione
  0 siblings, 1 reply; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-28 19:01 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* Kris Maglione <bsdaemon@comcast.net> wrote:
> On Thu, Jun 28, 2007 at 08:45:22PM +0200, Enrico Weigelt wrote:
> >Another key point is licensing. I need something that's
> >compatible with all the othes on linking. LGPL would fit
> >nice, IMHO.
>
> All of my code is either MIT licensed or in the Public Domain.

hmm, I'm not a license expert. Does MIT-L allow compiling
agaist other licences, ie (L)GPL, MPL, etc ?
Wasn't there some issue w/ having to display author names
on each program start ?

I personally would feel better w/ LGPL (just because it always
worked fine). Any objections against LGPL ?

> >Ah, do you have an little example for the client ?
>
> libixp comes with a client, cmd/ixpc.c

hmm, couldnt find it :(
I've tried: http://www.suckless.org/snaps/wmii+ixp-20070508.tgz


cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 18:57           ` Kris Maglione
@ 2007-06-28 19:03             ` Enrico Weigelt
  2007-06-28 19:15               ` Kris Maglione
  0 siblings, 1 reply; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-28 19:03 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* Kris Maglione <bsdaemon@comcast.net> wrote:
> On Thu, Jun 28, 2007 at 11:52:07AM -0700, ron minnich wrote:
> >"libixp lacks lib9p's file trees."
>
> It means that it doesn't have 9pfile(2). mkdir works, but you
> have to manage the tree yourself.

What does this exactly mean ?


cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 19:01             ` Enrico Weigelt
@ 2007-06-28 19:10               ` Kris Maglione
  2007-06-28 19:37                 ` Enrico Weigelt
  0 siblings, 1 reply; 50+ messages in thread
From: Kris Maglione @ 2007-06-28 19:10 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]

On Thu, Jun 28, 2007 at 09:01:33PM +0200, Enrico Weigelt wrote:
>hmm, I'm not a license expert. Does MIT-L allow compiling 
>agaist other licences, ie (L)GPL, MPL, etc ?
>Wasn't there some issue w/ having to display author names
>on each program start ? 

It doesn't have to appear at the program start, and the MIT 
license gives explicit permission to sublicense its code. The 
copyright doesn't have to be at the top of the file, but it must 
remain on the code. This is perfectly LGPL compatible. In fact, 
the LGPL requires it, because it's the entire basis of the 
'copyleft' system.

>I personally would feel better w/ LGPL (just because it always
>worked fine). Any objections against LGPL ?

Yes, it's very long and significantly more restrictive than MIT. 
I don't see the need to add the restrictions of the LGPL, nor 
the verbosity or proselatizing that it contains throughout. That 
being said, there's nothing stopping you from sublicensing it 
with the LGPL.

>hmm, couldnt find it :(
>I've tried: http://www.suckless.org/snaps/wmii+ixp-20070508.tgz

In the wmii tarball, it's called wmiir.c. I should setup nightly 
tarballs, but the plain libixp distibution comes from hg.

-- 
Kris Maglione

If it's good they will stop making it.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 19:03             ` Enrico Weigelt
@ 2007-06-28 19:15               ` Kris Maglione
  0 siblings, 0 replies; 50+ messages in thread
From: Kris Maglione @ 2007-06-28 19:15 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 873 bytes --]

On Thu, Jun 28, 2007 at 09:03:39PM +0200, Enrico Weigelt wrote:
>What does this exactly mean ?

See 9pfile(1). lib9p has a feature to do most of the work of 
managing trees, especially walking and cloning. It's convenient 
in many circumstances, and works very well for things like 
ramfs, but is not very useful when you provide a synthetic 
filesystem that represents program state, or the like. In that 
case, you'd have to manage two instances of the date if you were 
to use 9pfile.

I've been meaning to experiment with some methods of doing 
similar on top of libixp, as well as providing some more 
convenience functions for common, complex things, but haven't 
gotten to it yet. (There are a few of them used in wmii already, 
just not migrated to libixp).

-- 
Kris Maglione

A pat on the back is only a few inches from a kick
in the pants.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 19:10               ` Kris Maglione
@ 2007-06-28 19:37                 ` Enrico Weigelt
  2007-06-28 19:50                   ` Kris Maglione
  2007-06-28 20:17                   ` Kris Maglione
  0 siblings, 2 replies; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-28 19:37 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* Kris Maglione <bsdaemon@comcast.net> wrote:

Hi,

> It doesn't have to appear at the program start, and the MIT
> license gives explicit permission to sublicense its code. The
> copyright doesn't have to be at the top of the file, but it must
> remain on the code. This is perfectly LGPL compatible.

Okay, as long as I can link that lib into all the other apps
I'm going to "port" to 9p, I'm fine with that.

> >I personally would feel better w/ LGPL (just because it always
> >worked fine). Any objections against LGPL ?
>
> Yes, it's very long and significantly more restrictive than MIT.
> I don't see the need to add the restrictions of the LGPL, nor
> the verbosity or proselatizing that it contains throughout. That
> being said, there's nothing stopping you from sublicensing it
> with the LGPL.
>
> >hmm, couldnt find it :(
> >I've tried: http://www.suckless.org/snaps/wmii+ixp-20070508.tgz
>
> In the wmii tarball, it's called wmiir.c. I should setup nightly
> tarballs, but the plain libixp distibution comes from hg.

Ah, ok, there it is :)
But it doesn't seem to work properly w/ the u9fs + npfs servers.
"wmirr ls -ld /etc" works as it should (like /bin/ls does), but
other commands (ie read or ls w/o -d) do not output anything.

I compared the server debug between linux kernel client and wmirr,
seems that an Topen is missing at wmirr.


cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 19:37                 ` Enrico Weigelt
@ 2007-06-28 19:50                   ` Kris Maglione
  2007-06-28 20:12                     ` Enrico Weigelt
  2007-06-30  0:51                     ` Enrico Weigelt
  2007-06-28 20:17                   ` Kris Maglione
  1 sibling, 2 replies; 50+ messages in thread
From: Kris Maglione @ 2007-06-28 19:50 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

On Thu, Jun 28, 2007 at 09:37:25PM +0200, Enrico Weigelt wrote:
>Ah, ok, there it is :)
>But it doesn't seem to work properly w/ the u9fs + npfs servers.
>"wmirr ls -ld /etc" works as it should (like /bin/ls does), but
>other commands (ie read or ls w/o -d) do not output anything.
>
>I compared the server debug between linux kernel client and wmirr,
>seems that an Topen is missing at wmirr. 

That's strange. I've never tried it with u9fs servers, but it 
works fine for me with libixp, lib9p, and Inferno servers.

-- 
Kris Maglione

Any surviving best shots are ruined when someone
inadvertently open the darkroom door and all of the
dark leaks out.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 19:50                   ` Kris Maglione
@ 2007-06-28 20:12                     ` Enrico Weigelt
  2007-06-30  0:51                     ` Enrico Weigelt
  1 sibling, 0 replies; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-28 20:12 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* Kris Maglione <bsdaemon@comcast.net> wrote:
> On Thu, Jun 28, 2007 at 09:37:25PM +0200, Enrico Weigelt wrote:
> >Ah, ok, there it is :)
> >But it doesn't seem to work properly w/ the u9fs + npfs servers.
> >"wmirr ls -ld /etc" works as it should (like /bin/ls does), but
> >other commands (ie read or ls w/o -d) do not output anything.
> >
> >I compared the server debug between linux kernel client and wmirr,
> >seems that an Topen is missing at wmirr.
>
> That's strange. I've never tried it with u9fs servers, but it
> works fine for me with libixp, lib9p, and Inferno servers.

hmm. maybe the missing Topen is the key ?


cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 19:37                 ` Enrico Weigelt
  2007-06-28 19:50                   ` Kris Maglione
@ 2007-06-28 20:17                   ` Kris Maglione
  1 sibling, 0 replies; 50+ messages in thread
From: Kris Maglione @ 2007-06-28 20:17 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

On Thu, Jun 28, 2007 at 09:37:25PM +0200, Enrico Weigelt wrote:
>Ah, ok, there it is :)
>But it doesn't seem to work properly w/ the u9fs + npfs servers.
>"wmirr ls -ld /etc" works as it should (like /bin/ls does), but
>other commands (ie read or ls w/o -d) do not output anything.
>
>I compared the server debug between linux kernel client and wmirr,
>seems that an Topen is missing at wmirr. 

According to styxmon, spfs's ufs (which crashes on me when I 
close the connection) sends Ropen with an iounit of 0.

% listen -A tcp!localhost!6660 {styxmon {os dial tcp!localhost!6538>[1=0]}}
Tmsg.Version(65535,65535,"9P2000")
Rmsg.Version(65535,8216,"9P2000")
Tmsg.Attach(1,1,4294967295,"kris","")
Rmsg.Attach(1,Qid(16r2,1177900453,16r80))
Tmsg.Walk(0,1,2,nil)
Rmsg.Walk(0,array[] of {})
Tmsg.Stat(1,2)
Rmsg.Stat(1,Dir("","root","wheel",Qid(16r2,1177900453,16r80),8r20000000755,1183060067,1177900453,0,16r0,0))
Tmsg.Clunk(1,2)
Rmsg.Clunk(1)
Tmsg.Walk(0,1,2,nil)
Rmsg.Walk(0,array[] of {})
Tmsg.Open(1,2,0)
Rmsg.Open(1,Qid(16r2,1177900453,16r80),0)
styxmon: eof from tmsg

-- 
Kris Maglione

To err is human, but to really foul things up requires
a computer.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 14:28 ` Eric Van Hensbergen
  2007-06-28 15:20   ` ron minnich
  2007-06-28 16:51   ` Uriel
@ 2007-06-29  0:56   ` Roman Shaposhnik
  2007-06-29  1:07     ` Kris Maglione
  2 siblings, 1 reply; 50+ messages in thread
From: Roman Shaposhnik @ 2007-06-29  0:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Thu, 2007-06-28 at 07:28 -0700, Eric Van Hensbergen wrote:
> Uriel maintains a web page with all the different options for various
> languages.  One place to look is at npfs/spfs which is maintained as a
> sourceforge project.  There are some incomplete developer works
> articles on using it via my blog (http://www.graverobber.org)

  So what kind of advantages does npfs and spfs have over lib9client ?

Thanks,
Roman.



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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 17:49       ` Kris Maglione
  2007-06-28 18:45         ` Enrico Weigelt
  2007-06-28 18:52         ` ron minnich
@ 2007-06-29  1:05         ` Roman Shaposhnik
  2007-06-29  1:22           ` ron minnich
  2007-06-29  5:37           ` Uriel
  2 siblings, 2 replies; 50+ messages in thread
From: Roman Shaposhnik @ 2007-06-29  1:05 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Thu, 2007-06-28 at 13:49 -0400, Kris Maglione wrote:
> On Thu, Jun 28, 2007 at 07:36:29PM +0200, Enrico Weigelt wrote:
> >Okay folks, grabbed npfs and spfs from CVS.
>
> Might I suggest you try libixp instead of npfs? Aside from .u
> and auth, it does nearly everything that spfs does, only in
> about 1/10th the size, and with much clearer code, in my
> opinion. The API is based largely on lib9p. If you need
> something that it doesn't have (threading support?), it should
> be easy to add (I'd even be willing to add threading support, if
> you tell me the threading API to use).
>
> http://www.suckless.org/wiki/libs/libixp

  Now I'm *completely* confused. ;-) So it seems that we have 4
choices: lib9client (part of Plan9 from userspace), npfs, spfs
and now libixp. Are they completely different? Under which
circumstances does each make the most sense?

Thanks,
Roman.



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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29  0:56   ` Roman Shaposhnik
@ 2007-06-29  1:07     ` Kris Maglione
  2007-06-29  1:10       ` ron minnich
  0 siblings, 1 reply; 50+ messages in thread
From: Kris Maglione @ 2007-06-29  1:07 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

>  So what kind of advantages does npfs and spfs have over lib9client ?

Mainly that they don't depend on p9p, including the libraries 
and factotum.

-- 
Kris Maglione

People in systems do not do what the systems says
they are doing.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29  1:07     ` Kris Maglione
@ 2007-06-29  1:10       ` ron minnich
  0 siblings, 0 replies; 50+ messages in thread
From: ron minnich @ 2007-06-29  1:10 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 6/28/07, Kris Maglione <bsdaemon@comcast.net> wrote:
> >  So what kind of advantages does npfs and spfs have over lib9client ?
>
> Mainly that they don't depend on p9p, including the libraries
> and factotum.

I don't know if this is an 'advantage', but I had problems with p9p
stuff on 2.4, mainly due to the fact that 2.4 threads were so
marginal. npfs and spfs were a better fit for me than the p9p stuff
for that case.

ron


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29  1:05         ` Roman Shaposhnik
@ 2007-06-29  1:22           ` ron minnich
  2007-06-29  4:31             ` Kris Maglione
  2007-06-29  5:37           ` Uriel
  1 sibling, 1 reply; 50+ messages in thread
From: ron minnich @ 2007-06-29  1:22 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 6/28/07, Roman Shaposhnik <rvs@sun.com> wrote:

>   Now I'm *completely* confused. ;-) So it seems that we have 4
> choices: lib9client (part of Plan9 from userspace), npfs, spfs
> and now libixp. Are they completely different? Under which
> circumstances does each make the most sense?

if you are on unix and don't *ever* intend to go to plan 9, reduce to
npfs, spfs, ixp

if you don't need threads, reduce to spfs, ixp

libspfs lets you do stuff like this (from xbootfs)
static void
fsinit(void)
{
        Spfile *file;
        root = spfile_alloc(NULL, "", 0555 | Dmdir, Qroot, &root_ops, NULL);
        root->parent = root;
        spfile_incref(root);
        root->atime = root->mtime = time(NULL);
        root->uid = root->muid = user;
        root->gid = user->dfltgroup;

        create_file(root, "ctl", 0644, Qctl, &ctl_ops, NULL, NULL);
        datafile = create_file(root, "data", 0444, Qdata, &data_ops,
NULL, NULL);
        datafile->length = filelen;
        create_file(root, "avail", 0666, Qavail, &avail_ops, NULL, NULL);
        file = create_file(root, "redir", 0444, Qredir, &redir_ops, NULL, NULL);
        /* make it too long, it matters not ... */
        file->length = 32;
}

if you don't need stuff like that, use libixp

or, if you want to read a nice, tight implementation of 9p in c, just
get libixp anyway. It's neat.

ron


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29  1:22           ` ron minnich
@ 2007-06-29  4:31             ` Kris Maglione
  0 siblings, 0 replies; 50+ messages in thread
From: Kris Maglione @ 2007-06-29  4:31 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

On Thu, Jun 28, 2007 at 06:22:32PM -0700, ron minnich wrote:
> if you don't need threads, reduce to spfs, ixp

I've already started adding threading support to libixp. I'm not 
tieing it to a particular library, because I intend to use it 
with Russ' libtask in the future, and in a single threaded 
client, but I know that some people need preemptive threading. I 
was also influenced by a ruby wrapper someone wrote, where I 
found out that ruby does its own green threading (not 
pretty...).

By default, it just uses nops for things like locking.

> or, if you want to read a nice, tight implementation of 9p in c, just
> get libixp anyway. It's neat.

Thanks.

-- 
Kris Maglione

Pure drivel tends to drive ordinary
drivel off the tv screen.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29  1:05         ` Roman Shaposhnik
  2007-06-29  1:22           ` ron minnich
@ 2007-06-29  5:37           ` Uriel
  2007-06-29 11:56             ` Enrico Weigelt
  1 sibling, 1 reply; 50+ messages in thread
From: Uriel @ 2007-06-29  5:37 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 6/29/07, Roman Shaposhnik <rvs@sun.com> wrote:
> On Thu, 2007-06-28 at 13:49 -0400, Kris Maglione wrote:
> > On Thu, Jun 28, 2007 at 07:36:29PM +0200, Enrico Weigelt wrote:
> > >Okay folks, grabbed npfs and spfs from CVS.
> >
> > Might I suggest you try libixp instead of npfs? Aside from .u
> > and auth, it does nearly everything that spfs does, only in
> > about 1/10th the size, and with much clearer code, in my
> > opinion. The API is based largely on lib9p. If you need
> > something that it doesn't have (threading support?), it should
> > be easy to add (I'd even be willing to add threading support, if
> > you tell me the threading API to use).
> >
> > http://www.suckless.org/wiki/libs/libixp
>
>   Now I'm *completely* confused. ;-) So it seems that we have 4
> choices: lib9client (part of Plan9 from userspace), npfs, spfs
> and now libixp. Are they completely different? Under which
> circumstances does each make the most sense?

There are many more choices, see http://9p.cat-v.org/implementations

uriel


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29  5:37           ` Uriel
@ 2007-06-29 11:56             ` Enrico Weigelt
  0 siblings, 0 replies; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-29 11:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* Uriel <uriel99@gmail.com> wrote:

Hi,

> There are many more choices, see http://9p.cat-v.org/implementations

Hugh, that's a lot. I'm totally unsure.
I need some assistance in choosing the right one ;-O

My requirements (for an production use) are:

* Standalone library, with minimal dependencies
* Must work on GNU/Linux and other *nix'es and be (potentially)
  portable to strange platforms like win32.
* Easy to use, examples available
* Must build cleanly in one pass, provide an .pc descriptor
* Stable API
* Supports MT
* Licence (import)-compatible w/ the most important OSS-Licences


cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 17:36     ` Enrico Weigelt
  2007-06-28 17:40       ` erik quanstrom
  2007-06-28 17:49       ` Kris Maglione
@ 2007-06-29 12:37       ` Eric Van Hensbergen
  2007-06-29 14:12         ` Enrico Weigelt
  2 siblings, 1 reply; 50+ messages in thread
From: Eric Van Hensbergen @ 2007-06-29 12:37 UTC (permalink / raw)
  To: weigelt, Fans of the OS Plan 9 from Bell Labs

On 6/28/07, Enrico Weigelt <weigelt@metux.de> wrote:
> The 9p driver in linux-2.6.19 (which currently is the latest
> stable in Gentoo) is some bit broken. First I had to fix the
> init function to abort if the result code if the called functions
> (ie. register_filesystem) is non-zero instead of zero ;o
> And if you're mounting the npfs or u9fs server and chdir into
> the mountpoint's subdir under the mountpoint itself, the process
> will hang (forever?). Obviously an recursion problem.
>

yeah - bad luck on that kernel -- I was a crappy maintainer and wasn't
doing proper regressions and some runtime bugs slipped in without me
seeing it.  You should be able to backport the fs/9p code from the
latest and greatest official kernel (not the v9fs devel directory)
without much trouble and things will be much more stable for you.

The recursive mount problem is something that you have to watch
yourself on -- single threaded file servers (like spfs and u9fs) will
just end up blocking indefinitely.  There are cases where you can
screw with multithreaded file servers and blow your kernel stack
recursing.  When it comes down to it, it is a misconfiguration, you
shouldn't loopback mount stuff in such a way that you recurse -- one
way around it is to always mount in a new namespace (which is what
Plan 9 does).  Without private name spaces there are no good solutions
which we could work out.

          -eric


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29 12:37       ` Eric Van Hensbergen
@ 2007-06-29 14:12         ` Enrico Weigelt
  2007-06-29 14:25           ` Charles Forsyth
       [not found]           ` <c0ae573a0daa29e787cf87aa9deaae79@terzarima.net>
  0 siblings, 2 replies; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-29 14:12 UTC (permalink / raw)
  To: 9fans

* Eric Van Hensbergen <ericvh@gmail.com> wrote:

> yeah - bad luck on that kernel -- I was a crappy maintainer and wasn't
> doing proper regressions and some runtime bugs slipped in without me
> seeing it.  You should be able to backport the fs/9p code from the
> latest and greatest official kernel (not the v9fs devel directory)
> without much trouble and things will be much more stable for you.

Ok, I'll have a look.

> The recursive mount problem is something that you have to watch
> yourself on -- single threaded file servers (like spfs and u9fs)
> will just end up blocking indefinitely.

The kernel should not hangup if the server is in trouble.
Perhaps some reasonable timeout would be fine - if we dont
get an response, abort w/ IO error.

cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29 14:12         ` Enrico Weigelt
@ 2007-06-29 14:25           ` Charles Forsyth
       [not found]           ` <c0ae573a0daa29e787cf87aa9deaae79@terzarima.net>
  1 sibling, 0 replies; 50+ messages in thread
From: Charles Forsyth @ 2007-06-29 14:25 UTC (permalink / raw)
  To: weigelt, 9fans

> The kernel should not hangup if the server is in trouble.
> Perhaps some reasonable timeout would be fine - if we dont
> get an response, abort w/ IO error.

that will not work.
responses can legitimately be delayed indefinitely.
often the `files' are services and replies arrive (only) when the work is done.



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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
       [not found]           ` <c0ae573a0daa29e787cf87aa9deaae79@terzarima.net>
@ 2007-06-29 20:13             ` Enrico Weigelt
  2007-06-29 20:30               ` Francisco J Ballesteros
  0 siblings, 1 reply; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-29 20:13 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* Charles Forsyth <forsyth@terzarima.net> wrote:
> > The kernel should not hangup if the server is in trouble.
> > Perhaps some reasonable timeout would be fine - if we dont
> > get an response, abort w/ IO error.
>
> that will not work.
> responses can legitimately be delayed indefinitely.
> often the `files' are services and replies arrive
> (only) when the work is done.

well, then at least that should be interruptible.
otherwise an process which reads from such an service will
always be totally unresponsive.


cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29 20:13             ` Enrico Weigelt
@ 2007-06-29 20:30               ` Francisco J Ballesteros
  2007-06-29 21:32                 ` Enrico Weigelt
  0 siblings, 1 reply; 50+ messages in thread
From: Francisco J Ballesteros @ 2007-06-29 20:30 UTC (permalink / raw)
  To: weigelt, Fans of the OS Plan 9 from Bell Labs

Another problem is that in general, only the user or the application knows
when it's a problem, and when it's a s l o o w link.

I had to adjust timeouts in the Plan B ns (which does timeout as you
suggest) a lot
of times, to avoid paranoia regarding "is it a network error, or yet
another bug I introduced?".

You can use an intermediate file server process to do your timeouts,
and run them only
when you know there's a problem. That way the kernel you never see a hanged up
ns.

Also, for what it's worth, I have to say that despite being able to
recover the root
FS in Plan B, in the end, we ended rebooting the machine when it looses the
connection to the FS (dns, and other programs, including the IP
config, would suffer
badly). Rebooting was just more simple and won against recovering.


On 6/29/07, Enrico Weigelt <weigelt@metux.de> wrote:
> * Charles Forsyth <forsyth@terzarima.net> wrote:
> > > The kernel should not hangup if the server is in trouble.
> > > Perhaps some reasonable timeout would be fine - if we dont
> > > get an response, abort w/ IO error.
> >
> > that will not work.
> > responses can legitimately be delayed indefinitely.
> > often the `files' are services and replies arrive
> > (only) when the work is done.
>
> well, then at least that should be interruptible.
> otherwise an process which reads from such an service will
> always be totally unresponsive.
>
>
> cu
> --
> ---------------------------------------------------------------------
>  Enrico Weigelt    ==   metux IT service - http://www.metux.de/
> ---------------------------------------------------------------------
>  Please visit the OpenSource QM Taskforce:
>         http://wiki.metux.de/public/OpenSource_QM_Taskforce
>  Patches / Fixes for a lot dozens of packages in dozens of versions:
>         http://patches.metux.de/
> ---------------------------------------------------------------------
>


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29 20:30               ` Francisco J Ballesteros
@ 2007-06-29 21:32                 ` Enrico Weigelt
  2007-06-29 21:40                   ` ron minnich
  2007-06-29 21:53                   ` Francisco J Ballesteros
  0 siblings, 2 replies; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-29 21:32 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* Francisco J Ballesteros <nemo@lsub.org> wrote:

> Another problem is that in general, only the user or the application
> knows when it's a problem, and when it's a s l o o w link.

No keepalive / ping to check network problems ?

> I had to adjust timeouts in the Plan B ns (which does timeout as you
> suggest) a lot of times, to avoid paranoia regarding "is it a network
> error, or yet another bug I introduced?".
>
> You can use an intermediate file server process to do your timeouts,
> and run them only when you know there's a problem. That way the kernel
> you never see a hanged up ns.

Aehm, are we still talking about the v9fs linux driver ?
It really shouldn't hang up if the server dies.

cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29 21:32                 ` Enrico Weigelt
@ 2007-06-29 21:40                   ` ron minnich
  2007-07-11 18:52                     ` Jack Johnson
  2007-06-29 21:53                   ` Francisco J Ballesteros
  1 sibling, 1 reply; 50+ messages in thread
From: ron minnich @ 2007-06-29 21:40 UTC (permalink / raw)
  To: weigelt, Fans of the OS Plan 9 from Bell Labs

On 6/29/07, Enrico Weigelt <weigelt@metux.de> wrote:
> * Francisco J Ballesteros <nemo@lsub.org> wrote:
>
> > Another problem is that in general, only the user or the application
> > knows when it's a problem, and when it's a s l o o w link.
>
> No keepalive / ping to check network problems ?

in the good old days of tcp/ip over radio, there were links that went
silent for days in some cases, then continued. SO:

> It really shouldn't hang up if the server dies.

if the server is half a world away, how do you know if it's dead? I
think in the limit this is a tough problem.

ron


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29 21:32                 ` Enrico Weigelt
  2007-06-29 21:40                   ` ron minnich
@ 2007-06-29 21:53                   ` Francisco J Ballesteros
  2007-06-30 12:03                     ` Enrico Weigelt
  1 sibling, 1 reply; 50+ messages in thread
From: Francisco J Ballesteros @ 2007-06-29 21:53 UTC (permalink / raw)
  To: weigelt, Fans of the OS Plan 9 from Bell Labs

We changed the TCP timeout, i.e., besides Plan 9, we broke tcp as well.

> Aehm, are we still talking about the v9fs linux driver ?
> It really shouldn't hang up if the server dies.
>

But then you have to move your mouse to keep it alive?
change mouse with your favorite device here.


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 19:50                   ` Kris Maglione
  2007-06-28 20:12                     ` Enrico Weigelt
@ 2007-06-30  0:51                     ` Enrico Weigelt
  2007-06-30  0:55                       ` Kris Maglione
  2007-06-30 18:05                       ` Latchesar Ionkov
  1 sibling, 2 replies; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-30  0:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* Kris Maglione <bsdaemon@comcast.net> wrote:

Hi,

> That's strange. I've never tried it with u9fs servers, but it
> works fine for me with libixp, lib9p, and Inferno servers.

I've tracked it down a little bit. Seems the iounit in the fid
is zero (no idea why). And that leads ixp_read() to do actually
nothing, but return immediately. So the files get opened, but
not a bit is read.


cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-30  0:51                     ` Enrico Weigelt
@ 2007-06-30  0:55                       ` Kris Maglione
  2007-06-30 11:39                         ` Enrico Weigelt
  2007-06-30 18:05                       ` Latchesar Ionkov
  1 sibling, 1 reply; 50+ messages in thread
From: Kris Maglione @ 2007-06-30  0:55 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 495 bytes --]

On Sat, Jun 30, 2007 at 02:51:23AM +0200, Enrico Weigelt wrote:
>I've tracked it down a little bit. Seems the iounit in the fid 
>is zero (no idea why). And that leads ixp_read() to do actually 
>nothing, but return immediately. So the files get opened, but 
>not a bit is read.

I guess you missed my other response...

-- 
Kris Maglione

Never eat at a place called moms, never play cards with a
man named doc, and never lie down with a woman who has
got more troubles than you.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-30  0:55                       ` Kris Maglione
@ 2007-06-30 11:39                         ` Enrico Weigelt
  2007-06-30 16:16                           ` Kris Maglione
  0 siblings, 1 reply; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-30 11:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* Kris Maglione <bsdaemon@comcast.net> wrote:
> On Sat, Jun 30, 2007 at 02:51:23AM +0200, Enrico Weigelt wrote:
> >I've tracked it down a little bit. Seems the iounit in the fid
> >is zero (no idea why). And that leads ixp_read() to do actually
> >nothing, but return immediately. So the files get opened, but
> >not a bit is read.
>
> I guess you missed my other response...

ugh, which one ?

BTW: I've now got it working, just setting iounit to some useful
size (ie. 512) in initfid() if it's zero.

And I now moved libixp to its own package, w/ .pc file, etc.


cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29 21:53                   ` Francisco J Ballesteros
@ 2007-06-30 12:03                     ` Enrico Weigelt
  0 siblings, 0 replies; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-30 12:03 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* Francisco J Ballesteros <nemo@lsub.org> wrote:
> We changed the TCP timeout, i.e., besides Plan 9, we broke tcp as well.
>
> >Aehm, are we still talking about the v9fs linux driver ?
> >It really shouldn't hang up if the server dies.
> >
>
> But then you have to move your mouse to keep it alive?
> change mouse with your favorite device here.

Doesn't the protocol handle that ?
Well, in case of TCP, the IP stack should handle it.

But ups we came far away from my original problem.
It's an bug in the Linux 9P driver which makes access to 9p files
uninterruptible. At least it should emit an IO error if the tcp
link goes down.


cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-30 11:39                         ` Enrico Weigelt
@ 2007-06-30 16:16                           ` Kris Maglione
  2007-06-30 17:39                             ` Enrico Weigelt
  0 siblings, 1 reply; 50+ messages in thread
From: Kris Maglione @ 2007-06-30 16:16 UTC (permalink / raw)
  To: 9fans


[-- Attachment #1.1: Type: text/plain, Size: 740 bytes --]

On Sat, Jun 30, 2007 at 01:39:54PM +0200, Enrico Weigelt wrote:
>ugh, which one ?

Attached.

>BTW: I've now got it working, just setting iounit to some useful
>size (ie. 512) in initfid() if it's zero.

I don't think that's the right thing to do. I'll have to look 
into it some more.

>And I now moved libixp to its own package, w/ .pc file, etc.

I'm not sure what you mean by that. You surgically removed it 
from wmii? You could have just grabbed it from hg, but there's a 
threadsafe version available which is in its own package now:

http://suckless.org/~jg/libixp.tgz

What do you mean by .pc file?

-- 
Kris Maglione

1) Things will get worse before they get better.
2) Who said things would get better?

[-- Attachment #1.2: foo.eml --]
[-- Type: message/rfc822, Size: 3386 bytes --]

[-- Attachment #1.2.1.1: Type: text/plain, Size: 1191 bytes --]

On Thu, Jun 28, 2007 at 09:37:25PM +0200, Enrico Weigelt wrote:
>Ah, ok, there it is :)
>But it doesn't seem to work properly w/ the u9fs + npfs servers.
>"wmirr ls -ld /etc" works as it should (like /bin/ls does), but
>other commands (ie read or ls w/o -d) do not output anything.
>
>I compared the server debug between linux kernel client and wmirr,
>seems that an Topen is missing at wmirr. 

According to styxmon, spfs's ufs (which crashes on me when I 
close the connection) sends Ropen with an iounit of 0.

% listen -A tcp!localhost!6660 {styxmon {os dial tcp!localhost!6538>[1=0]}}
Tmsg.Version(65535,65535,"9P2000")
Rmsg.Version(65535,8216,"9P2000")
Tmsg.Attach(1,1,4294967295,"kris","")
Rmsg.Attach(1,Qid(16r2,1177900453,16r80))
Tmsg.Walk(0,1,2,nil)
Rmsg.Walk(0,array[] of {})
Tmsg.Stat(1,2)
Rmsg.Stat(1,Dir("","root","wheel",Qid(16r2,1177900453,16r80),8r20000000755,1183060067,1177900453,0,16r0,0))
Tmsg.Clunk(1,2)
Rmsg.Clunk(1)
Tmsg.Walk(0,1,2,nil)
Rmsg.Walk(0,array[] of {})
Tmsg.Open(1,2,0)
Rmsg.Open(1,Qid(16r2,1177900453,16r80),0)
styxmon: eof from tmsg

-- 
Kris Maglione

To err is human, but to really foul things up requires
a computer.

[-- Attachment #1.2.1.2: Type: application/pgp-signature, Size: 194 bytes --]

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-30 16:16                           ` Kris Maglione
@ 2007-06-30 17:39                             ` Enrico Weigelt
  2007-06-30 17:45                               ` Kris Maglione
  0 siblings, 1 reply; 50+ messages in thread
From: Enrico Weigelt @ 2007-06-30 17:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* Kris Maglione <bsdaemon@comcast.net> wrote:
> On Sat, Jun 30, 2007 at 01:39:54PM +0200, Enrico Weigelt wrote:
> >ugh, which one ?
>
> Attached.

Ah, ok :)
I'm not sure if spfs sends this zero or libixp doesn't decode it.
With npfs I've got the same problem.

But it's interesting that the Linux 9p driver doesn't have any
problem w/ spfs or npfs. No idea if it does an similar hack as mine.

> >BTW: I've now got it working, just setting iounit to some useful
> >size (ie. 512) in initfid() if it's zero.
>
> I don't think that's the right thing to do. I'll have to look
> into it some more.

Yep. It's just a dirty hack to get it running. But for now it
seem sto work.

> >And I now moved libixp to its own package, w/ .pc file, etc.
>
> I'm not sure what you mean by that. You surgically removed it
> from wmii? You could have just grabbed it from hg, but there's a
> threadsafe version available which is in its own package now:

I just know of the one bundled w/ wmii. So I took it.
>
> http://suckless.org/~jg/libixp.tgz

Thx, I'll have a look at it and try to merge them.

> What do you mean by .pc file?

Descriptor file for pkg-config. So it can find the lib.


cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-30 17:39                             ` Enrico Weigelt
@ 2007-06-30 17:45                               ` Kris Maglione
  2007-06-30 18:15                                 ` Latchesar Ionkov
  0 siblings, 1 reply; 50+ messages in thread
From: Kris Maglione @ 2007-06-30 17:45 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]

On Sat, Jun 30, 2007 at 07:39:12PM +0200, Enrico Weigelt wrote:
>I'm not sure if spfs sends this zero or libixp doesn't decode it.
>With npfs I've got the same problem.

spfs sends it. styxmon has nothing to do with libixp.

>But it's interesting that the Linux 9p driver doesn't have any
>problem w/ spfs or npfs. No idea if it does an similar hack as mine.

lib9pclient ignores the iounit entirely. npfs does this, which 
is nowhere in the spec, and thus confuses me:

	fid->iounit = rc->iounit;
	if (!fid->iounit || fid->iounit>fid->fsys->msize-IOHDRSZ)
		fid->iounit = fid->fsys->msize-IOHDRSZ;

-- 
Kris Maglione

The best shots happen immediately after the last
frame is exposed.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-30  0:51                     ` Enrico Weigelt
  2007-06-30  0:55                       ` Kris Maglione
@ 2007-06-30 18:05                       ` Latchesar Ionkov
  1 sibling, 0 replies; 50+ messages in thread
From: Latchesar Ionkov @ 2007-06-30 18:05 UTC (permalink / raw)
  To: weigelt, Fans of the OS Plan 9 from Bell Labs

There is nothing wrong with iounit being set to zero.

    Lucho

On 6/29/07, Enrico Weigelt <weigelt@metux.de> wrote:
> * Kris Maglione <bsdaemon@comcast.net> wrote:
>
> Hi,
>
> > That's strange. I've never tried it with u9fs servers, but it
> > works fine for me with libixp, lib9p, and Inferno servers.
>
> I've tracked it down a little bit. Seems the iounit in the fid
> is zero (no idea why). And that leads ixp_read() to do actually
> nothing, but return immediately. So the files get opened, but
> not a bit is read.
>
>
> cu
> --
> ---------------------------------------------------------------------
>  Enrico Weigelt    ==   metux IT service - http://www.metux.de/
> ---------------------------------------------------------------------
>  Please visit the OpenSource QM Taskforce:
>         http://wiki.metux.de/public/OpenSource_QM_Taskforce
>  Patches / Fixes for a lot dozens of packages in dozens of versions:
>         http://patches.metux.de/
> ---------------------------------------------------------------------
>
>


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-30 17:45                               ` Kris Maglione
@ 2007-06-30 18:15                                 ` Latchesar Ionkov
  2007-06-30 19:32                                   ` Kris Maglione
  0 siblings, 1 reply; 50+ messages in thread
From: Latchesar Ionkov @ 2007-06-30 18:15 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 6/30/07, Kris Maglione <bsdaemon@comcast.net> wrote:
> On Sat, Jun 30, 2007 at 07:39:12PM +0200, Enrico Weigelt wrote:
> >I'm not sure if spfs sends this zero or libixp doesn't decode it.
> >With npfs I've got the same problem.
>
> spfs sends it. styxmon has nothing to do with libixp.
>
> >But it's interesting that the Linux 9p driver doesn't have any
> >problem w/ spfs or npfs. No idea if it does an similar hack as mine.
>
> lib9pclient ignores the iounit entirely. npfs does this, which
> is nowhere in the spec, and thus confuses me:
>
>         fid->iounit = rc->iounit;
>         if (!fid->iounit || fid->iounit>fid->fsys->msize-IOHDRSZ)
>                 fid->iounit = fid->fsys->msize-IOHDRSZ;

If the client gets iounit equal to zero, it has to pick a
greater-than-zero number. msize - IOHDRSZ is the maximum number of
bytes that can be read/written with a single message.

    Lucho


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-30 18:15                                 ` Latchesar Ionkov
@ 2007-06-30 19:32                                   ` Kris Maglione
  2007-06-30 20:34                                     ` geoff
  0 siblings, 1 reply; 50+ messages in thread
From: Kris Maglione @ 2007-06-30 19:32 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

> If the client gets iounit equal to zero, it has to pick a
> greater-than-zero number. msize - IOHDRSZ is the maximum number of
> bytes that can be read/written with a single message.

I guess the kernel is the authoritative source on this, even 
though the man pages don't mention it. I'll capitulate.

-- 
Kris Maglione

An alcoholic is a person who drinks more than his
own physician.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-30 19:32                                   ` Kris Maglione
@ 2007-06-30 20:34                                     ` geoff
  2007-06-30 20:39                                       ` Kris Maglione
  0 siblings, 1 reply; 50+ messages in thread
From: geoff @ 2007-06-30 20:34 UTC (permalink / raw)
  To: 9fans

The man pages mention it; see iounit(2) and read(5).



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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-30 20:34                                     ` geoff
@ 2007-06-30 20:39                                       ` Kris Maglione
  2007-06-30 21:18                                         ` geoff
  0 siblings, 1 reply; 50+ messages in thread
From: Kris Maglione @ 2007-06-30 20:39 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

On Sat, Jun 30, 2007 at 04:34:33PM -0400, geoff@plan9.bell-labs.com wrote:
>The man pages mention it; see iounit(2) and read(5).

Thanks, I suppose I should have grepped; I only checked open(5) 
and intro(5). I didn't associate the text in iounit(2) with the 
9P protocol.

-- 
Kris Maglione

Bad law is more likely to be supplemented than repealed.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-30 20:39                                       ` Kris Maglione
@ 2007-06-30 21:18                                         ` geoff
  0 siblings, 0 replies; 50+ messages in thread
From: geoff @ 2007-06-30 21:18 UTC (permalink / raw)
  To: 9fans

Don't forget lookman.  I just typed `lookman iounit'.



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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-28 16:51   ` Uriel
@ 2007-07-11 18:16     ` Eric Van Hensbergen
  0 siblings, 0 replies; 50+ messages in thread
From: Eric Van Hensbergen @ 2007-07-11 18:16 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 6/28/07, Uriel <uriel99@gmail.com> wrote:
> See http://9p.cat-v.org
>
> I'm still waiting for some kind of npfs/spfs release I can link to
> from there, last I checked spfs was only accessible as some random
> tree in the v9fs cvs.
>

I put a tarball out at sf.net (npfs project).

       -eric


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

* Re: [9fans] What do I need for a small 9P2000 server @ Linux ?
  2007-06-29 21:40                   ` ron minnich
@ 2007-07-11 18:52                     ` Jack Johnson
  0 siblings, 0 replies; 50+ messages in thread
From: Jack Johnson @ 2007-07-11 18:52 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 6/29/07, ron minnich <rminnich@gmail.com> wrote:
> if the server is half a world away, how do you know if it's dead? I
> think in the limit this is a tough problem.

http://www.ipnsig.org/reports/draft-irtf-ipnrg-arch-01.txt

Though, it looks like they dodge the issue a bit.

-Jack


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

end of thread, other threads:[~2007-07-11 18:52 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-28 13:31 [9fans] What do I need for a small 9P2000 server @ Linux ? Enrico Weigelt
2007-06-28 14:28 ` Eric Van Hensbergen
2007-06-28 15:20   ` ron minnich
2007-06-28 17:36     ` Enrico Weigelt
2007-06-28 17:40       ` erik quanstrom
2007-06-28 17:49       ` Kris Maglione
2007-06-28 18:45         ` Enrico Weigelt
2007-06-28 18:49           ` Kris Maglione
2007-06-28 19:01             ` Enrico Weigelt
2007-06-28 19:10               ` Kris Maglione
2007-06-28 19:37                 ` Enrico Weigelt
2007-06-28 19:50                   ` Kris Maglione
2007-06-28 20:12                     ` Enrico Weigelt
2007-06-30  0:51                     ` Enrico Weigelt
2007-06-30  0:55                       ` Kris Maglione
2007-06-30 11:39                         ` Enrico Weigelt
2007-06-30 16:16                           ` Kris Maglione
2007-06-30 17:39                             ` Enrico Weigelt
2007-06-30 17:45                               ` Kris Maglione
2007-06-30 18:15                                 ` Latchesar Ionkov
2007-06-30 19:32                                   ` Kris Maglione
2007-06-30 20:34                                     ` geoff
2007-06-30 20:39                                       ` Kris Maglione
2007-06-30 21:18                                         ` geoff
2007-06-30 18:05                       ` Latchesar Ionkov
2007-06-28 20:17                   ` Kris Maglione
2007-06-28 18:52         ` ron minnich
2007-06-28 18:57           ` Kris Maglione
2007-06-28 19:03             ` Enrico Weigelt
2007-06-28 19:15               ` Kris Maglione
2007-06-29  1:05         ` Roman Shaposhnik
2007-06-29  1:22           ` ron minnich
2007-06-29  4:31             ` Kris Maglione
2007-06-29  5:37           ` Uriel
2007-06-29 11:56             ` Enrico Weigelt
2007-06-29 12:37       ` Eric Van Hensbergen
2007-06-29 14:12         ` Enrico Weigelt
2007-06-29 14:25           ` Charles Forsyth
     [not found]           ` <c0ae573a0daa29e787cf87aa9deaae79@terzarima.net>
2007-06-29 20:13             ` Enrico Weigelt
2007-06-29 20:30               ` Francisco J Ballesteros
2007-06-29 21:32                 ` Enrico Weigelt
2007-06-29 21:40                   ` ron minnich
2007-07-11 18:52                     ` Jack Johnson
2007-06-29 21:53                   ` Francisco J Ballesteros
2007-06-30 12:03                     ` Enrico Weigelt
2007-06-28 16:51   ` Uriel
2007-07-11 18:16     ` Eric Van Hensbergen
2007-06-29  0:56   ` Roman Shaposhnik
2007-06-29  1:07     ` Kris Maglione
2007-06-29  1:10       ` ron minnich

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