struct backing_dev_info {

unsigned long ra_pages; /* max readahead in PAGE_CACHE_SIZE units */ unsigned long state; /* Always use atomic bitops on this */ unsigned int capabilities; /* Device capabilities */

ra_pages specifies the maximum number of pages to be read in anticipation (readahead). The state of the backing store is stored in state. capabilities holds information on the backing store — for example, whether the data in the store can be executed directly as is necessary in ROM-based filesystems. However, the most important information in capabilities is whether pages can be written back. This can always be done with genuine block devices but is not possible with memory-based devices such as RAM disks because there would be little point in writing back data from memory to memory.

If bdi_cap_no_writeback is set, then synchronization is not required; otherwise, it is. Chapter 17 discusses the mechanisms used for this purpose in detail.

□ private_list is used to interlink buffer_head instances which hold filesystem metadata (usually indirection blocks). assoc_mapping is a pointer to the associated address space.

□ The flag set in flags is used primarily to hold information on the GFP memory area from which the mapped pages originate. It can also hold errors that occur during asynchronous input/output and that cannot therefore be propagated directly. as_eio stands for a general I/O error, and as_enospc indicates that there is no longer sufficient space for an asynchronous write operation.

Figure 16-3 sketches how address spaces are connected with various other parts of the kernel. Only the most important links are shown in this overview; more details will be discussed in the remainder of this chapter.

Figure 16-3: Address spaces and their connection with central kernel data structures and subsystems.

Continue reading here: Page Trees

Was this article helpful?

0 0