Re: [IDEA] - run-length compaction of block numbers
From: Valdis . Kletnieks
Date: Fri Jan 16 2004 - 14:57:50 EST
On Fri, 16 Jan 2004 11:38:59 PST, raymond jennings <highwind747@xxxxxxxxxxx> said:
> Is there any value in creating a new filesystem that encodes long contiguous
> blocks as a single block run instead of multiple block numbers? A long file
> may use only a few block runs instead of many block numbers if there is
> little fragmentation (usually the case). Also dynamic allocation of
> inodes...etc. The details are long; anyone interested can e-mail me
> privately.
Only question I have is how you make an efficient scheme for finding the block
number for an offset several gigabytes into the file. You either get to run
through the list linearly (gaak) or you need to stick a tree or hash on the
front to allow semi-random access to a starting point to scan linearly from, at
which point you've probably blown any space savings unless you have a VERY low
fragmentation rate...
On the other hand, dynamic allocation of inodes is interesting, as it means
you're not screwed if over time, the NBPI value for the filesystem changes (or
if you simply guessed wrong at mkfs time) and you run out of inodes when you
still have space free. Reiserfs V3 already does this, in fact...
Attachment:
pgp00000.pgp
Description: PGP signature