]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: don't call readahead hook until we have read the entire eb
authorJosef Bacik <jbacik@fusionio.com>
Sat, 20 Apr 2013 14:18:27 +0000 (10:18 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:55:03 +0000 (15:55 -0400)
commit10261ede25cc8dfe227bfab1fae52fe0f2c7ef84
tree7f2de2444ea17770e172d5fa91e60859eb4405f6
parent09d981e070799a1f060a98a5a8ce6d3bf1b199cc
Btrfs: don't call readahead hook until we have read the entire eb

Martin Steigerwald reported a BUG_ON() where we were given a bogus bytenr to
map.  Turns out he is using > PAGESIZE leafsizes.  The readahead stuff is called
every time we do a completion, but we may not have finished reading in all the
pages, so the bytenr we read off the node could be completely bogus.  Fix this
by only calling the readahead hook once all pages have been read in.  Thanks,

Reported-by: Martin Steigerwald <Martin@lichtvoll.de>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/disk-io.c