Friday May 04, 2007

More on ChunkFS

Remember that spaghetti filesystem comment I made yesterday? Chad Mynhier has written a good analysis of chunkfs and its shortcomings.

For filesystems, the first-order problem needs to be solved first: eliminate fsck, don't attempt to reduce the time it'll take. Perform writes to disk in such a way that the on-disk data is always consistent. If your filesystem can't do that, then redesign it.

Thursday May 03, 2007

fsck time

Every so often, someone brings up the fact that fsck takes longer and longer on large filesystems. The more stuff that goes in there, the more stuff needs to be fsck'd. I just read about "chunkfs", one possible answer to the fsck problem. It works by dividing the single large filesystem into 256 smaller sub-filesystems which are presented to the user as just one.

What happens when one sub-filesystem fills up?

The answer here is the creation of a "continuation inode." These inodes track the allocation of blocks in a different chunk; they look much like files in their own right, but they are part of a larger array of block allocations. The "real" inode for a given file can have pointers to up to four continuation inodes in different chunks; if more are needed, each continuation inode can, itself, point to another four continuations. Thus, continuation inodes can be chained to create files of arbitrary length.

We've all heard the term spaghetti code, but this is the first time I've heard of a spaghetti filesystem.

About

Known throughout Sun as a man of infinite wit, of jovial attitude, and of making things up about himself at the slightest whim.

Search

Archives
« July 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
   
       
Today