Re: [RFC][PATCH] ChunkFS: fs fission for faster fsck

Jörn Engel
2007-04-27T10:58:44Z

On Thu, 26 April 2007 22:07:43 -0700, Valerie Henson wrote:
>
> What's important is that each continuation inode have a
> back pointer to the parent and that there is some structure for
> quickly looking up the continuation inode for a given file offset.
> Suggestions for data structures that work well in this situation are
> welcome. :)

All this would get easier if continuation inodes were known to be rare.
You can ditch the doubly-linked list in favor of a pointer to the main
inode then - traversing the list again is cheap, after all. And you can
just try to read the same block once for every continuation inode.

If those lists can get long and you need a mapping from offset to
continuation inode on the medium, you are basically fscked. Storing the
mapping requires space. You need the mapping only when space (in some
chunk) gets tight and you allocate continuation inodes. So either you
don't need the mapping or you don't have a good place to put it.

Having a mapping in memory is also questionable. Either you scan the
whole file on first access and spend a long time for large files. Or
you create the mapping on the fly. In that case the page cache will
already give you a 90% solution for free.

You should spend a lot of effort trying to minimize cnodes. ;)

Jörn

--
To recognize individual spam features you have to try to get into the
mind of the spammer, and frankly I want to spend as little time inside
the minds of spammers as possible.
-- Paul Graham