On Thu Sep 9 09:54:56 EDT 2010, [email protected] 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