> Goel stated that doing consistency checking at runtime is faced with the problem that consistency properties are global in nature and are therefore expensive to check. To find two pointers to the same data block, one must scan the entire filesystem, for example.
Now that this problem has been recognized, could future filesystems be designed so that all relevant consistency properties are local instead of global?
In the quoted example, for instance, the filesystem could record an "owner" identifier for each data block, instead of a single "used/free" bit. Then the check "two owners point to the same data block" becomes instead "the data block points back to the correct owner".
In an ext3-style implementation of this concept, the owner identifier could be the block which points to this data block. So if you are looking at a data block pointed to by an indirect block you have to check 3 invariants, all local: "the data block owner is the indirect block", "the indirect block points to the data block", and "there are no duplicate data blocks within this indirect block". The same applies if you have a block containing inodes instead of an indirect block.
Posted Apr 3, 2012 18:05 UTC (Tue) by dtlin (✭ supporter ✭, #36537)
[Link]
According to Btrfs Design, btrfs has backrefs from each btree node and file extent to its parents — plural, because there may be multiple.
Runtime filesystem consistency checking
Posted Apr 4, 2012 8:05 UTC (Wed) by dgm (subscriber, #49227)
[Link]
In general, the path to reliability is to add redundancy and increase locality. Redundancy decreases the probability of complete failure, and locality limits the impact of the failure.