Opened 18 years ago

Last modified 5 years ago

#74 assigned defect

libc: inode id & copy

Reported by: bird Owned by: bird
Priority: normal Milestone:
Component: libc-backend Version: 0.6
Severity: normal Keywords: inode number
Cc:

Description

The current inode number scheme is missing one bit in it's implementation. When we're copying files using OS/2 facilities, or even zipping/unzipping stuff, we end up creating duplicate inode numbers.

The inode number generation is made up of two 32-bit numbers generated from the cannonized native path of the object. We then distiguish between creating a new object, correcting the inode value of an existing object, and generating a completely new one for an existing one. In the first case we have to generate both parts, and we use crc32 and sdbm for that. In the second case we read the inode number from the disk, but we regenerates the sdbm part. In the third case we generate both using djb2 and sdbm.

Attachments (1)

fs.diff (740 bytes) - added by KO Myung-Hun 5 years ago.
Patch calculating inode whenever stat()ed.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 17 years ago by bird

Milestone: libc-0.6.2libc-0.6.3

comment:2 Changed 17 years ago by bird

Milestone: libc-0.6.3libc-0.6.4

comment:3 Changed 13 years ago by bird

Status: newassigned

comment:4 Changed 12 years ago by bird

Milestone: libc-0.6.5libc-0.6.6

comment:5 Changed 10 years ago by Yuri Dario

Milestone: libc-0.6.6

comment:6 Changed 5 years ago by KO Myung-Hun

Here is the patch calculating inodes whenever stat()'ed. Even if files have the same inode on a disk, a program using stat() will show the different inodes.

At the beginning place, I'm not sure storing inodes into EA is right. It would be better to generate fake inodes whenever needed like this approach.

Changed 5 years ago by KO Myung-Hun

Attachment: fs.diff added

Patch calculating inode whenever stat()ed.

Note: See TracTickets for help on using tickets.