Skip to contentSkip to conversation

inodes in dirread

DISCUSSION Eric Van Hensbergen 1 participant 2 messages Jan 5, 2024 – Jan 6, 2024 9P file system

lore
Share & tools
lore

Eric Van Hensbergen

author maintainer
#0 lore raw

Anyone know what the inode in dirent is actually used for during a dirread? Right now we are hashing the qid to an inode number, but I was planning on re-writing this so we can let the client allocate inode numbers for itself to guarentee uniqueness. However, that would mean I'd have to allocate inode numbers is dirread (if we aren't using the cache) and then immediately discarding them which seems wasteful. Puting qid.path there "works" but I'm not sure what assumptions I'm breaking.

-eric

author maintainer
#1 lore raw
Quoted 9 lines · Eric Van Hensbergen

Anyone know what the inode in dirent is actually used for during a dirread? Right now we are hashing the qid to an inode number, but I was planning on re-writing this so we can let the client allocate inode numbers for itself to guarentee uniqueness. However, that would mean I'd have to allocate inode numbers is dirread (if we aren't using the cache) and then immediately discarding them which seems wasteful. Puting qid.path there "works" but I'm not sure what assumptions I'm breaking.

Disregard, I ended up backing out that particular line of inquiry and just sticking with the modified qid.paths in the i_ino for now.

-eric