9pfuse/ramfs

85 views
Skip to first unread message

ron minnich

unread,
Aug 10, 2011, 4:57:15 PM8/10/11
to plan9port
I am hoping it's just pilot error, but, ramfs assert is failing.

ramfs -D

and then
9pfuse /tmp/ns.rminnich._tmp_launch-jDz9YN_org.x\:0/ramfs /tmp/mnt

and ramfs explodes:

ramfs 578:<-Tversion tag 65535 msize 8192 version '9P2000'
ramfs 578:->Rversion tag 65535 msize 8192 version '9P2000'
nova:venti rminnich$ ramfs 578:<-Tattach tag 0 fid 0 afid -1 uname
rminnich aname
ramfs 578:->Rattach tag 0 qid (0000000000000000 0 d)
ramfs 578:<-Twalk tag 0 fid 0 newfid 1 nwname 0
ramfs 578:->Rwalk tag 0 nwqid 0
ramfs 578:<-Topen tag 0 fid 1 mode 0
ramfs 578:->Ropen tag 0 qid (0000000000000000 0 d) iounit 0
ramfs 578:<-Tclunk tag 0 fid 1
clunk fid 1 busy=1
f 1 zero busy
ramfs 578:->Rclunk tag 0
ramfs 578:<-Tstat tag 0 fid 0
ramfs 578:->Rstat tag 0 stat '.' 'rminnich' 'rminnich' 'rminnich' q
(0000000000000000 0 d) m 020000000775 at 1313009647 mt 1313009647 l 0
t 578 d 0
ramfs 578:<-Twalk tag 0 fid 0 newfid 1 nwname 0
ramfs 578:->Rwalk tag 0 nwqid 0
ramfs 578:<-Topen tag 0 fid 1 mode 0
ramfs 578:->Ropen tag 0 qid (0000000000000000 0 d) iounit 0
ramfs 578:<-Tclunk tag 0 fid 1
clunk fid 1 busy=1
f 1 zero busy
ramfs 578:->Rclunk tag 0
ramfs 578:<-Twalk tag 0 fid 0 newfid 1 nwname 0
ramfs 578:->Rwalk tag 0 nwqid 0
ramfs 578:<-Topen tag 0 fid 1 mode 0
ramfs 578:->Ropen tag 0 qid (0000000000000000 0 d) iounit 0
ramfs 578:<-Tclunk tag 0 fid 1
clunk fid 1 busy=1
f 1 zero busy
ramfs 578:->Rclunk tag 0
ramfs 578:<-Twalk tag 0 fid 0 newfid 1 nwname 0
ramfs 578:->Rwalk tag 0 nwqid 0
ramfs 578:<-Topen tag 0 fid 1 mode 0
ramfs 578:->Ropen tag 0 qid (0000000000000000 0 d) iounit 0
ramfs 578:<-Tclunk tag 0 fid 1
clunk fid 1 busy=1
f 1 zero busy
ramfs 578:->Rclunk tag 0
ramfs 578:<-Twalk tag 0 fid 0 newfid 1 nwname 0
ramfs 578:->Rwalk tag 0 nwqid 0
ramfs 578:<-Topen tag 0 fid 1 mode 0
ramfs 578:->Ropen tag 0 qid (0000000000000000 0 d) iounit 0
ramfs 578:<-Tclunk tag 0 fid 1
clunk fid 1 busy=1
f 1 zero busy
ramfs 578:->Rclunk tag 0
ramfs 578:<-Twalk tag 0 fid 0 newfid 1 nwname 0
ramfs 578:->Rwalk tag 0 nwqid 0
ramfs 578:<-Topen tag 0 fid 1 mode 0
ramfs 578:->Ropen tag 0 qid (0000000000000000 0 d) iounit 0
ramfs 578:<-Tclunk tag 0 fid 1
clunk fid 1 busy=1
f 1 zero busy
ramfs 578:->Rclunk tag 0
ramfs 578:<-Twalk tag 0 fid 0 newfid 1 nwname 1 0:._.
f 1 zero busy
Assertion failed: (f->busy), function rwalk, file ramfs.c, line 376.

I don't get the clunk of 0 at the end; all that happen was a walk to
it. But I'll dig around some more.

ron

Russ Cox

unread,
Aug 10, 2011, 5:08:26 PM8/10/11
to rmin...@gmail.com, plan9port
i am not sure that ramfs has ever worked.

Russ Cox

unread,
Aug 10, 2011, 5:08:43 PM8/10/11
to rmin...@gmail.com, plan9port
On Wed, Aug 10, 2011 at 5:08 PM, Russ Cox <r...@swtch.com> wrote:
> i am not sure that ramfs has ever worked.

on the other hand, i do know that mounting
acme or sources has definitely worked
with 9pfuse.

ron minnich

unread,
Aug 10, 2011, 5:15:28 PM8/10/11
to Russ Cox, plan9port
On Wed, Aug 10, 2011 at 2:08 PM, Russ Cox <r...@swtch.com> wrote:
> i am not sure that ramfs has ever worked.
>

yeah, it doesn't :-)

but I'm going to see what I can do. I could use it.

ron

fge...@gmail.com

unread,
Dec 19, 2023, 5:22:25 AM12/19/23
to plan9port
Could anybody get ramfs to work?
thanks!

fge...@gmail.com

unread,
Dec 19, 2023, 10:52:34 AM12/19/23
to plan9port-dev
Turns out ramfs.c depends on realloc(p, n) where p!=nil && n==0 and
erealloc() wasn't handling this case.

Change realloc() in ramfs.c to this and remove the assert().
void *
erealloc(void *p, ulong n)
{
p = realloc(p, n);
if(!p && n != 0)
error("out of memory");
return p;
}

ramfs is ok.
Reply all
Reply to author
Forward
0 new messages