]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: defer csum calcuations sometimes
authorSage Weil <sage@redhat.com>
Thu, 19 May 2016 10:25:23 +0000 (06:25 -0400)
committerSage Weil <sage@redhat.com>
Wed, 1 Jun 2016 15:38:50 +0000 (11:38 -0400)
commitd4f4fa0312d943dd0ce3c27f5fc56c7a753bb471
treeaae069463bd1fe2b6bf1dfc795435381c6c89a63
parentf6151f7697ec4d91e34ec7f4a56559f6c2c6c6d9
os/bluestore: defer csum calcuations sometimes

When we are doing a partial chunk overwrite, we need to defer the csum_data
update.  Otherwise, another write in the same transaction might need to
read part of the chunk, not find the data in the buffer cache, read it
from disk, and fail the csum check.

This patch defers the calculation until after we've build the transaction
and are about to commit to the kv store.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h