project-machine / puzzlefs

A next-generation container filesystem
Apache License 2.0
393 stars 17 forks source link

puzzlefs,format: add primitive for resolving "max" inode #31

Closed tych0 closed 3 years ago

tych0 commented 3 years ago

we'll need this for generating FS deltas, since we don't want to re-use inodes. this means that inode numbers are monotonically increasing and will never be re-used. however, this seems like it's maybe OK, since the filesystem is read-only, and inodes will only ever be orphaned if a file is deleted in a higher layer.

if this becomes a problem, we can probably do orphan resolution where we do some fancy math to figure out which inodes we can re-use. but let's just punt for now :)

We also fix a bug where we didn't seek when parsing inodes :). this wasn't manifested in the current code, but was kind of a foot-gun API.

Signed-off-by: Tycho Andersen tycho@tycho.pizza