Caution: If lookup_bh_lru fails, the desired buffer is not automatically read from the block device. This is done by the following interface functions.

Interface Functions

Normal kernel code does not generally come into contact with either bh_lookup_lru or bh_lru_install because these functions are encapsulated. The kernel provides generic routines for accessing individual blocks, and these automatically cover the buffer cache, thus rendering explicit interaction with the cache unnecessary. These routines include_getblk and_bread, which are implemented in fs/buffer.c.

Before discussing their implementation, it is best to describe not only what the two functions have in common, but also how they differ. First, they both require the same parameters:

Continue reading here: Fsbufferc

Was this article helpful?

0 0