* [9fans] kfs bug @ 2010-09-09 13:39 rod 2010-09-09 13:58 ` Charles Forsyth 0 siblings, 1 reply; 4+ messages in thread From: rod @ 2010-09-09 13:39 UTC (permalink / raw) To: 9fans kfs works fine for a bit and then fails with an "out of files" error. It happens when the fid in a 9p message gets to a value greater than 32767. I think the "fid" field in struct File should be a 32-bit type rather than a short int. 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. Rod ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] kfs bug 2010-09-09 13:39 [9fans] kfs bug rod @ 2010-09-09 13:58 ` Charles Forsyth 2010-09-09 14:26 ` rod 2010-09-09 22:28 ` erik quanstrom 0 siblings, 2 replies; 4+ messages in thread From: Charles Forsyth @ 2010-09-09 13:58 UTC (permalink / raw) To: 9fans >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. mind you, that reminds me that i'd noticed something odd when looking at 9p traces earlier in the summer, which i'd failed to note to track down later (unless i did work it out and decided there wasn't a problem). ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] kfs bug 2010-09-09 13:58 ` Charles Forsyth @ 2010-09-09 14:26 ` rod 2010-09-09 22:28 ` erik quanstrom 1 sibling, 0 replies; 4+ messages in thread From: rod @ 2010-09-09 14:26 UTC (permalink / raw) To: 9fans >a plan 9 client normally re-used fids, Ah right, thank you - I see that now. I have just tried native plan9 and, of course, it works fine. I was running 9vx earlier and it seems as if the fid increments each time. Rod ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] kfs bug 2010-09-09 13:58 ` Charles Forsyth 2010-09-09 14:26 ` rod @ 2010-09-09 22:28 ` erik quanstrom 1 sibling, 0 replies; 4+ messages in thread From: erik quanstrom @ 2010-09-09 22:28 UTC (permalink / raw) To: 9fans 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-09 22:28 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-09-09 13:39 [9fans] kfs bug rod 2010-09-09 13:58 ` Charles Forsyth 2010-09-09 14:26 ` rod 2010-09-09 22:28 ` erik quanstrom
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).