April 2012
Intermediate to advanced
352 pages
8h
English
As mentioned previously, block devices transfer randomly accessible data in fixed-size blocks; for example, disk drives. Naturally, block drivers provide access to block devices. Block drivers are characterized by the fact that all I/O is cached within the kernel’s buffer cache, which makes block drivers unreliable, for two reasons. First, because caching can reorder a sequence of write operations, it deprives the writing process of the ability to identify the exact disk contents at any moment in time. This makes reliable crash recovery of on-disk data structures (for example, filesystems) impossible. Second, caching can delay write operations. So if an error occurs, the kernel cannot report to the process that did the write ...