]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.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>
Mon, 11 Nov 2013 05:56:08 +0000 (21:56 -0800)
commitcc23196631fbcd1bc3eafedbb712413fdbf946a3
tree92f606edf7dc4b83ec5d1438f6e33b28e12af7bc
parent2c1953e201a05ddfb1ea53f23d81a492c6513028
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