]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cls_rbd: enable object map checksums for object_map_save 7149/head
authorDouglas Fuller <dfuller@redhat.com>
Thu, 7 Jan 2016 19:01:19 +0000 (11:01 -0800)
committerDouglas Fuller <dfuller@redhat.com>
Thu, 7 Jan 2016 19:01:19 +0000 (11:01 -0800)
object_map_save disables CRCs when an object map footer isn't provided.
Unconditionally re-enable object map CRCs before re-encoding the new object
map.

Fixes: #14280
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
src/cls/rbd/cls_rbd.cc

index a55cc05c936b6e3af63298cbd15e8d8a509263a4..cc27ab0e3fab2996948996e68a7694fe6098e246 100644 (file)
@@ -2203,6 +2203,8 @@ int object_map_save(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
     return -EINVAL;
   }
 
+  object_map.set_crc_enabled(true);
+
   bufferlist bl;
   ::encode(object_map, bl);
   CLS_LOG(20, "object_map_save: object size=%" PRIu64 ", byte size=%u",