]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: always set snapset context if can_create
authorSage Weil <sage@newdream.net>
Thu, 15 Jul 2010 21:09:13 +0000 (14:09 -0700)
committerSage Weil <sage@newdream.net>
Fri, 16 Jul 2010 19:02:25 +0000 (12:02 -0700)
The most common code paths loaded it, but not the case where the obc was
already loaded.

Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/ReplicatedPG.cc

index f19253191ad968e431bcb3a0e125a1f1b5f90358..11b8d8c8507ebd0444fafee55e8de70aa7789c04 100644 (file)
@@ -2442,6 +2442,10 @@ int ReplicatedPG::find_object_context(const object_t& oid, snapid_t snapid,
       return -ENOENT;
     dout(10) << "find_object_context " << oid << " @" << snapid << dendl;
     *pobc = obc;
+
+    if (can_create && !obc->obs.ssc)
+      obc->obs.ssc = get_snapset_context(oid, true);
+
     return 0;
   }