os/bluestore: fix race condtion during blob spliting #11422

Merged
merged 5 commits into from Oct 11, 2016

Projects

None yet

2 participants

@xiexingguo
Contributor

No description provided.

@liewegas liewegas was assigned by xiexingguo Oct 11, 2016
src/os/bluestore/BlueStore.cc
@@ -1665,31 +1665,35 @@ void BlueStore::ExtentMap::reshard(Onode *o, uint64_t min_alloc_size)
// shard boundary.
bool must_span = false;
BlobRef b = ep->blob;
- if (b->can_split()) {
@liewegas
liewegas Oct 11, 2016 Member

I think a simpler fix would be to take the cache lock just for the can_split() writing.empty() check. We have the collection lock so no new writes will race with us.. only IO completion. So if writing is empty now it's safe the drop the lock and assume it will still be empty below when we do the split.

@liewegas
Member

The other patches look good. Thanks!

xiexingguo added some commits Oct 11, 2016
@xiexingguo @xiexingguo xiexingguo os/bluestore: kiill dead member from bluestore_shared_blob_t
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
13d0f4f
@xiexingguo @xiexingguo xiexingguo os/bluestore: don't scan omap kvpair during fsck()
Because it does not check anything, and removing it can
speed up the process of fsck()

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
45b2570
@xiexingguo xiexingguo os/bluestore: fix race conditon during blob spliting
Signed-off-by: xiexingguo <xie.xingguo@zte.com.cn>
d300929
@xiexingguo xiexingguo os/bluestore: add sanity check to shard offset when updating
Signed-off-by: xiexingguo <xie.xingguo@zte.com.cn>
4e33747
@xiexingguo xiexingguo os/bluestore: improve ExtentMap::reshard() readability a little
As ep, sp and esp can be a little confusing.

Signed-off-by: xiexingguo <xie.xingguo@zte.com.cn>
d410573
@xiexingguo
Contributor

@liewegas Done.

@liewegas liewegas merged commit 61310d4 into ceph:master Oct 11, 2016

2 checks passed

Signed-off-by all commits in this PR are signed
Details
default Build finished.
Details
@xiexingguo xiexingguo deleted the xiexingguo:xxg-wip-bluestore-1011 branch Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment