From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <017e01c3134d$66024460$3f00a8c0@MERCURY> From: "Andrew Simmons" To: <9fans@cse.psu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: [9fans] Qid path generation Date: Tue, 6 May 2003 09:29:23 +1200 Topicbox-Message-UUID: 9e786e42-eacb-11e9-9e20-41e7f4b1d025 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)?