]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: clear data digest on WRITEFULL if skip_data_digest 21676/head
authorSage Weil <sage@redhat.com>
Thu, 26 Apr 2018 14:15:50 +0000 (09:15 -0500)
committerSage Weil <sage@redhat.com>
Thu, 26 Apr 2018 14:15:50 +0000 (09:15 -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>
src/osd/PrimaryLogPG.cc

index a5c260740f8e609d2887661c8991b4d8943470e7..22495b7861cfebaef596c869462636274b7da1ba 100644 (file)
@@ -6428,7 +6428,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);