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: prevent lock for almost "flush" calls #12524

Merged
merged 1 commit into from Dec 29, 2016

Conversation

Projects
None yet
4 participants
@yuyuyu101
Member

yuyuyu101 commented Dec 16, 2016

Signed-off-by: Haomai Wang haomai@xsky.com

@yuyuyu101 yuyuyu101 added the bluestore label Dec 16, 2016

Show outdated Hide outdated src/os/bluestore/BlueStore.cc Outdated
@ifed01

This comment has been minimized.

Show comment
Hide comment
@ifed01

ifed01 Dec 16, 2016

Contributor

+1

Contributor

ifed01 commented Dec 16, 2016

+1

@liewegas

This comment has been minimized.

Show comment
Hide comment
@liewegas

liewegas Dec 17, 2016

Member

Conflicts with #12541

Member

liewegas commented Dec 17, 2016

Conflicts with #12541

@varadakari

This comment has been minimized.

Show comment
Hide comment
@varadakari

varadakari Dec 20, 2016

Contributor

@yuyuyu101 could you please resolve the conflicts?

Contributor

varadakari commented Dec 20, 2016

@yuyuyu101 could you please resolve the conflicts?

@@ -6411,6 +6413,7 @@ void BlueStore::_txc_write_nodes(TransContext *txc, KeyValueDB::Transaction t)
std::lock_guard<std::mutex> l(o->flush_lock);
o->flush_txns.insert(txc);
o->flushing_count++;
}
// objects we modified but didn't affect the onode

This comment has been minimized.

@liewegas

liewegas Dec 21, 2016

Member

need to increment flushing_count below, too

@liewegas

liewegas Dec 21, 2016

Member

need to increment flushing_count below, too

@liewegas

This comment has been minimized.

Show comment
Hide comment
@liewegas

liewegas Dec 22, 2016

Member
/home/jenkins-build/build/workspace/ceph-pull-requests/src/os/bluestore/BlueStore.cc: In member function ‘void BlueStore::_txc_write_nodes(BlueStore::TransContext*, KeyValueDB::Transaction)’:
/home/jenkins-build/build/workspace/ceph-pull-requests/src/os/bluestore/BlueStore.cc:6453:7: error: ‘o’ was not declared in this scope
       o->flushing_count++;
       ^
Member

liewegas commented Dec 22, 2016

/home/jenkins-build/build/workspace/ceph-pull-requests/src/os/bluestore/BlueStore.cc: In member function ‘void BlueStore::_txc_write_nodes(BlueStore::TransContext*, KeyValueDB::Transaction)’:
/home/jenkins-build/build/workspace/ceph-pull-requests/src/os/bluestore/BlueStore.cc:6453:7: error: ‘o’ was not declared in this scope
       o->flushing_count++;
       ^

@liewegas liewegas removed the needs-qa label Dec 22, 2016

@yuyuyu101

This comment has been minimized.

Show comment
Hide comment
@yuyuyu101

yuyuyu101 Dec 23, 2016

Member

done

Member

yuyuyu101 commented Dec 23, 2016

done

@liewegas liewegas added the needs-qa label Dec 23, 2016

@liewegas

This comment has been minimized.

Show comment
Hide comment
@liewegas

liewegas Dec 24, 2016

Member

needs rebase, sorry!

Member

liewegas commented Dec 24, 2016

needs rebase, sorry!

os/bluestore: prevent lock for almost "flush" calls
Signed-off-by: Haomai Wang <haomai@xsky.com>

@liewegas liewegas merged commit 12a0f96 into ceph:master Dec 29, 2016

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@yuyuyu101 yuyuyu101 deleted the yuyuyu101:wip-bluestore-flush branch Dec 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment