9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] kfs bug
Date: Thu,  9 Sep 2010 18:28:03 -0400	[thread overview]
Message-ID: <a2b0d7c86cd741f955db5e102ca38896@brasstown.quanstro.net> (raw)
In-Reply-To: <1023d4c768c8748eb15f14ff85786cf7@terzarima.net>

On Thu Sep  9 09:54:56 EDT 2010, forsyth@terzarima.net wrote:
> >Would I be right in thinking that 9p originally had 16 bit fids? If
> >so, it suggests that no-one has used kfs in anger for a while.
>
> how are you using the kfs? just locally?
> a plan 9 client normally re-used fids, so i'd have thought you'd need to have >32767 active files,
> which most people probably haven't done.

changing File->fid to ulong should be good enough.
i haven't had any trouble in testing on arm.

one could argue for u32int, but the rest of kfs doesn't
use u32int either and i didn't track down all the places
where fid is passed in an int anyway.

diff -c /n/dump/2010/0909/sys/src/cmd/disk/kfs/portdat.h portdat.h
/n/dump/2010/0909/sys/src/cmd/disk/kfs/portdat.h:150,156 - portdat.h:150,156
  	long	addr;
  	long	slot;
  	long	lastra;		/* read ahead address */
- 	short	fid;
+ 	ulong	fid;
  	short	uid;
  	char	open;
  		#define	FREAD	1
diff -c /n/dump/2010/0909/sys/src/cmd/disk/kfs/sub.c sub.c
/n/dump/2010/0909/sys/src/cmd/disk/kfs/sub.c:89,95 - sub.c:89,95
  			goto out;
  		}
  	}
- else print("cannot find %p.%d (list=%p)\n", cp, fid, cp->flist);
+ else print("cannot find %p.%ud (list=%p)\n", cp, fid, cp->flist);
  	unlock(&cp->flock);
  	return 0;

- erik



      parent reply	other threads:[~2010-09-09 22:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-09 13:39 rod
2010-09-09 13:58 ` Charles Forsyth
2010-09-09 14:26   ` rod
2010-09-09 22:28   ` erik quanstrom [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a2b0d7c86cd741f955db5e102ca38896@brasstown.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).