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 deferred writes vs collection split race #14157

Merged
merged 3 commits into from Apr 5, 2017

Conversation

Projects
None yet
3 participants
@liewegas
Member

liewegas commented Mar 26, 2017

Fixes: http://tracker.ceph.com/issues/19379

The first patch was prelim work for an alternate solution, and not
needed here, but I think it's a nice change anyway.

Show outdated Hide outdated src/os/bluestore/BlueStore.h
@@ -1603,6 +1603,12 @@ class BlueStore : public ObjectStore,
qcond.wait(l);
}
void drain_preceding(TransContext *txc) {
std::unique_lock<std::mutex> l(qlock);
while (!q.empty() && &q.back() != txc)

This comment has been minimized.

@ifed01

ifed01 Mar 27, 2017

Contributor

wondering if that should be q.front() != txc

@ifed01

ifed01 Mar 27, 2017

Contributor

wondering if that should be q.front() != txc

{
OpSequencer *osr = txc->osr.get();
dout(10) << __func__ << " " << txc << " osr " << osr << dendl;
deferred_aggressive = true; // FIXME: maybe osr-local aggressive flag?

This comment has been minimized.

@ifed01

ifed01 Mar 27, 2017

Contributor

Indeed making deferred_aggressive osr-local makes sense IMO

@ifed01

ifed01 Mar 27, 2017

Contributor

Indeed making deferred_aggressive osr-local makes sense IMO

@liewegas

This comment has been minimized.

Show comment
Hide comment
@liewegas

liewegas Mar 27, 2017

Member
Member

liewegas commented Mar 27, 2017

@ifed01

ifed01 approved these changes Mar 27, 2017

@tchaikov
/build/ceph-12.0.0-2064-g72a0791/src/test/objectstore_bench.cc: In function 'int main(int, const char**)':
/build/ceph-12.0.0-2064-g72a0791/src/test/objectstore_bench.cc:274:28: error: 'struct spg_t' has no member named 'make_temp_hobject'
       oids.emplace_back(pg.make_temp_hobject(oss.str()));
                            ^
/build/ceph-12.0.0-2064-g72a0791/src/test/objectstore_bench.cc:283:26: error: 'struct spg_t' has no member named 'make_temp_hobject'
     oids.emplace_back(pg.make_temp_hobject("osbench"));

see https://jenkins.ceph.com/job/ceph-dev-new-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=xenial,DIST=xenial,MACHINE_SIZE=huge/2272//consoleFull

liewegas added some commits Mar 26, 2017

osd: use target object hash (not pgid.ps) for temp objects
Signed-off-by: Sage Weil <sage@redhat.com>
os/bluestore: make deferred_aggressive atomic
This is written and read outside of any mutex.

Signed-off-by: Sage Weil <sage@redhat.com>
os/bluestore: flush osr on collection split
We need to ensure that any preceding txcs have finished their deferred
writes before splitting, or else later txcs on the child sequencer will
not order/wait for deferred writes correctly before deallocated extents.

Fixes: http://tracker.ceph.com/issues/19379
Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas

This comment has been minimized.

Show comment
Hide comment
@liewegas

liewegas Apr 3, 2017

Member

fixed build

Member

liewegas commented Apr 3, 2017

fixed build

fixed build

@liewegas liewegas merged commit 4759c70 into ceph:master Apr 5, 2017

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

@liewegas liewegas deleted the liewegas:wip-19379 branch Apr 5, 2017

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