]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: keep using cache even if op will invalid cache 26077/head
authorZengran Zhang <zhangzengran@sangfor.com.cn>
Tue, 11 Dec 2018 11:32:55 +0000 (19:32 +0800)
committerAshish Singh <assingh@redhat.com>
Tue, 22 Jan 2019 15:44:03 +0000 (21:14 +0530)
commit2da7314786efeefc911fafc4882a97768f7a2e55
tree840e6db0bc636a31c812176da23a3ea28f758286
parent84c28a8dcbf4dd306106d9d9bfcfd3e80f1c7331
osd: keep using cache even if op will invalid cache

the current wrong process on same obj in ec 4+2 pool with 16K stripe:

obj has 16K~16K with content-0
new op1 will write 8K~32K (16K~16K content-1)
op1 reserve 0K~48K in cache
op1 read 0~16K & 32K~48K from disk
new op2 will write 20K~24K (20K~4K content-2) *** (invalid_cache dur to clone)
op2 read 16K~32K from disk (content-0) ***** dur to not using_cache
op1 write 0~48K to disk (content-1)
op1 present 0~48K to cache (content-1)
op2 write 16~32K to disk (content-0 + content-2) *** here we drop the content1

even if the op will invalid cache, it should do that *after* itself,
the op should use the cache by itself.

Signed-off-by: Zengran Zhang <zhangzengran@sangfor.com.cn>
(cherry picked from commit e2dbb8058261e8cc3a3fb00362e2785f0ac6cf18)
src/osd/ECBackend.cc