]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: use write_info to set snap_collections in make_snap_collections
authorSamuel Just <sam.just@inktank.com>
Fri, 29 Jun 2012 20:39:49 +0000 (13:39 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 16 Jul 2012 17:59:55 +0000 (10:59 -0700)
At one point, snap_collections were written to a pg collection
attribute.  Subsequently, they were moved to the biginfo object
since the structure can grow too large for limited size xattrs.
make_snap_collection, however, was not updated.

Using write_info here should prevent this from happening in
the future.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc

index f026c2c719cc5511f2ef465adeb31298a01518cb..59156f7a8b2530007a344c1a896d22b8e0270a4b 100644 (file)
@@ -2537,10 +2537,8 @@ coll_t PG::make_snap_collection(ObjectStore::Transaction& t, snapid_t s)
   coll_t c(info.pgid, s);
   if (!snap_collections.contains(s)) {
     snap_collections.insert(s);
+    write_info(t);
     dout(10) << "create_snap_collection " << c << ", set now " << snap_collections << dendl;
-    bufferlist bl;
-    ::encode(snap_collections, bl);
-    t.collection_setattr(coll, "snap_collections", bl);
     t.create_collection(c);
   }
   return c;