]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: add a boundary check of cache read 10349/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 19 Jul 2016 12:02:48 +0000 (20:02 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 20 Jul 2016 02:37:16 +0000 (10:37 +0800)
commit3bc31746b5d9983920ae68eded1bef2a32ac342a
treed560c5e100dde36eb05c7eaa001440a0479707a2
parentd1f681a2741ac805d1a21087023147dddd218940
os/bluestore: add a boundary check of cache read

By trapping the "==" case and break, we can finish
the cache read just in time. As a result, we can avoid
two extra operations(adjusting "offset" and "length") and
the final loop check.

Since this is one of key methods of cache, it deserves this
fix.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc