]> git.karo-electronics.de Git - karo-tx-linux.git/commit
bcache: Clean up cache_lookup_fn
authorKent Overstreet <kmo@daterainc.com>
Thu, 25 Jul 2013 00:41:13 +0000 (17:41 -0700)
committerKent Overstreet <kmo@daterainc.com>
Wed, 11 Sep 2013 01:49:03 +0000 (18:49 -0700)
commit7f42f39ea9a8766d215b7394e60d14e780d62ec9
treeeb9bea23242e6ae09f4b188c502dc7e2acb5ce6f
parent42cdb731eb66693c6ad12bb28ae2f471f8bb0aa6
bcache: Clean up cache_lookup_fn

There was some looping in submit_partial_cache_hit() and
submit_partial_cache_hit() that isn't needed anymore - originally, we
wouldn't necessarily process the full hit or miss all at once because
when splitting the bio, we took into account the restrictions of the
device we were sending it to.

But, device bio size restrictions are now handled elsewhere, with a
wrapper around generic_make_request() - so that looping has been
unnecessary for awhile now and we can now do quite a bit of cleanup.

And if we trim the key we're reading from to match the subset we're
actually reading, we don't have to explicitly calculate bi_sector
anymore. Neat.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
drivers/md/bcache/request.c