btrfs: hooks for readahead
authorArne Jansen <sensille@gmx.net>
Fri, 10 Jun 2011 11:55:54 +0000 (13:55 +0200)
committerArne Jansen <sensille@gmx.net>
Sun, 2 Oct 2011 06:48:44 +0000 (08:48 +0200)
This adds the hooks needed for readahead. In the readpage_end_io_hook,
the extent state is checked for the EXTENT_READAHEAD flag. Only in this
case the readahead hook is called, to keep the impact on non-ra as low
as possible.
Additionally, a hook for a failed IO is added, otherwise readahead would
wait indefinitely for the extent to finish.

Changes for v2:
 - eliminate race condition

Signed-off-by: Arne Jansen <sensille@gmx.net>
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c

Simple merge
Simple merge