9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Qid path generation
@ 2003-05-05 21:29 Andrew Simmons
  2003-05-05 21:30 ` W. Josephson
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Andrew Simmons @ 2003-05-05 21:29 UTC (permalink / raw)
  To: 9fans

I'm pondering how to generate unique qid paths for NTFS/FAT32 files. The 2nd
ed toolset for Windows has a function called "pathqid" which generates a 4
byte number from the filename. I'd appreciate any hints on the workings of
this function, particularly the choice of the magic number 1000003, the
reason for masking with ~CHDIR, and the role of the first parameter, which
always seems to have 0 passed in - plus any ideas on extending the method to
8 bytes, or a better method.

Also, I would guess that a method such as pathqid could occasionally
generate the same number from two different file names. Any guesses as to
the impact of this on a client (eg 9fs)?



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

end of thread, other threads:[~2003-05-06 11:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-05 21:29 [9fans] Qid path generation Andrew Simmons
2003-05-05 21:30 ` W. Josephson
2003-05-05 21:33 ` rsc
2003-05-05 21:45   ` Andrew Simmons
2003-05-06 11:29     ` Aharon Robbins
2003-05-06  1:09   ` David Presotto
2003-05-06  1:10 ` David Presotto
2003-05-06  1:23   ` Andrew Simmons
2003-05-06  2:29     ` David Presotto
2003-05-06  3:05       ` Russ Cox

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