]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: hooks for readahead
authorArne Jansen <sensille@gmx.net>
Fri, 10 Jun 2011 11:55:54 +0000 (13:55 +0200)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Nov 2011 01:56:03 +0000 (20:56 -0500)
commit39638015e836ad2f19e5d3e0f9a4195d8525c9e4
tree298550cb516f29e1e708e79a6c56b40f5e67deac
parent1a278ac047af1d4e3db1943d09fcf1fc7037c121
btrfs: hooks for readahead

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>
(cherry picked from commit 4bb31e928d1a47f5bd046ecb176b8eff7c589fc0 with conflicts)
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c