From fe5038c7f9577327f82913b4565712c53903ee48 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 26 Apr 2018 09:15:50 -0500 Subject: [PATCH] osd/PrimaryLogPG: clear data digest on WRITEFULL if skip_data_digest 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 --- src/osd/PrimaryLogPG.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index a5c260740f8e6..22495b7861cfe 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -6428,7 +6428,9 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector& 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); -- 2.39.5