From a07894d17ecd1c52f00490c758eb73e1994cc7c3 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 16 Jun 2009 16:00:31 -0700 Subject: [PATCH] osd: fix cloned object context Screws up subsequent reads on cloned objects. And the bad ref counting was leaking memory. --- src/osd/ReplicatedPG.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 4321b260d451f..4cd50fd78e39d 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1333,6 +1333,8 @@ void ReplicatedPG::make_writeable(OpContext *ctx) ctx->clone_obc->obs.oi.last_reqid = oi.last_reqid; ctx->clone_obc->obs.oi.mtime = oi.mtime; ctx->clone_obc->obs.oi.snaps = snaps; + ctx->clone_obc->obs.exists = true; + ctx->clone_obc->get(); ctx->clone_obc->force_start_write(); if (is_primary()) -- 2.39.5