do_generic_mapping_read(9)

do_generic_mapping_read9

Generic file read routine

Usage

void do_generic_mapping_read(struct address_space * mapping, struct file_ra_state * _ra, struct file * filp, loff_t * ppos, read_descriptor_t * desc, read_actor_t actor);

Arguments

mapping

address_space to be read

_ra

file's readahead state

filp

the file to read

ppos

current file position

desc

read_descriptor

actor

read method

Overview

This is a generic file read routine, and uses the mapping->a_ops->readpage function for the actual low-level stuff.

This is really ugly. But the goto's actually try to clarify some of the logic when it comes to error handling etc.

Note the struct file* is only passed for the use of readpage. It may be NULL.

From linux-manual-2.6.18 2.6.18.dfsg.1-26etch2 in Debian 4.0 (Etch). Also shipped by linux-manual-2.6.24. Parsed by carta from the page's man source.