Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from Oct 11, 2016

Conversation

xiexingguo
Copy link
Member

No description provided.

@@ -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()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

The other patches look good. Thanks!

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
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>
Signed-off-by: xiexingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xiexingguo <xie.xingguo@zte.com.cn>
@xiexingguo xiexingguo force-pushed the xxg-wip-bluestore-1011 branch 2 times, most recently from 4869ca0 to 5de22bd Compare October 11, 2016 14:27
As ep, sp and esp can be a little confusing.

Signed-off-by: xiexingguo <xie.xingguo@zte.com.cn>
@xiexingguo
Copy link
Member Author

@liewegas Done.

@liewegas liewegas merged commit 61310d4 into ceph:master Oct 11, 2016
@xiexingguo xiexingguo deleted the xxg-wip-bluestore-1011 branch October 11, 2016 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants