From: Samuel Just Date: Fri, 29 Jun 2012 20:39:49 +0000 (-0700) Subject: PG: use write_info to set snap_collections in make_snap_collections X-Git-Tag: v0.50~59 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=12d70738d1f1fdb051d6c01d78e4ddf41c372413;p=ceph.git PG: use write_info to set snap_collections in make_snap_collections 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 --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index f026c2c719cc5..59156f7a8b253 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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;