generic_file_aio_read from mm/filemap.c reads data asynchronously. The associated code flow diagram is shown in Figure 8-13.
0 DIRECT set?
Figure 8-13: Code flow diagram for generic_file_aio_read.
After generic_segment_checks has ensured that the read request contains valid parameters, two possible Read modes are distinguished.
1. If the flag o_direct is set, data are read without using the page cache. generic_file_ direct_IO must then be used.
2. Otherwise, do_generic_file_read — a front end for do_generic_mapping_read — is used. This converts the read request for a file into a read operation with a mapping.
Continue reading here: Reading from Mappings
Was this article helpful?