]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: clear data digest on WRITEFULL if skip_data_digest 23028/head
authorSage Weil <sage@redhat.com>
Thu, 26 Apr 2018 14:15:50 +0000 (09:15 -0500)
committerSage Weil <sage@redhat.com>
Fri, 13 Jul 2018 12:07:07 +0000 (07:07 -0500)
If we detect we are on bluestore and should skip the data digest, we
need to clear any old digest on WRITEFULL.  This aligns us with the
WRITE behavior, which is also either an update or a clear (but never
neither!).

Fixes: https://tracker.ceph.com/issues/23871
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit fe5038c7f9577327f82913b4565712c53903ee48)

src/osd/PrimaryLogPG.cc

index e92c6d2465412228d5a6e8af4fb5d75ec0d4d570..87139a9fd7e6fdbb10f3f0754904af8fa9e8e1e5 100644 (file)
@@ -5904,7 +5904,9 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
        }
         if (!skip_data_digest) {
          obs.oi.set_data_digest(osd_op.indata.crc32c(-1));
-        }
+        } else {
+         obs.oi.clear_data_digest();
+       }
 
        write_update_size_and_usage(ctx->delta_stats, oi, ctx->modified_ranges,
            0, op.extent.length, true);