From 22ddc6da5fd03e65a7baf96748a8893cc258d977 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Wed, 11 Apr 2018 17:36:59 -0700 Subject: [PATCH] osd: Change shard digests to hex like object info digests Signed-off-by: David Zafman --- qa/standalone/scrub/osd-scrub-repair.sh | 216 ++++++++++++------------ src/osd/osd_types.cc | 4 +- 2 files changed, 110 insertions(+), 110 deletions(-) diff --git a/qa/standalone/scrub/osd-scrub-repair.sh b/qa/standalone/scrub/osd-scrub-repair.sh index 6fc77c9e28ccc..9e64993cdac55 100755 --- a/qa/standalone/scrub/osd-scrub-repair.sh +++ b/qa/standalone/scrub/osd-scrub-repair.sh @@ -668,8 +668,8 @@ function TEST_corrupt_scrub_replicated() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -712,8 +712,8 @@ function TEST_corrupt_scrub_replicated() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -778,8 +778,8 @@ function TEST_corrupt_scrub_replicated() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -841,8 +841,8 @@ function TEST_corrupt_scrub_replicated() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -924,8 +924,8 @@ function TEST_corrupt_scrub_replicated() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -973,8 +973,8 @@ function TEST_corrupt_scrub_replicated() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1069,8 +1069,8 @@ function TEST_corrupt_scrub_replicated() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1155,8 +1155,8 @@ function TEST_corrupt_scrub_replicated() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1206,8 +1206,8 @@ function TEST_corrupt_scrub_replicated() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 727918093, - "omap_digest": 4294967295, + "data_digest": "0x2b63260d", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1247,8 +1247,8 @@ function TEST_corrupt_scrub_replicated() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1290,8 +1290,8 @@ function TEST_corrupt_scrub_replicated() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 727918093, - "omap_digest": 4294967295, + "data_digest": "0x2b63260d", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1401,8 +1401,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1448,8 +1448,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1519,8 +1519,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1584,8 +1584,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1702,8 +1702,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1755,8 +1755,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1860,8 +1860,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1927,8 +1927,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -1993,8 +1993,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -2059,8 +2059,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -2125,8 +2125,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -2191,8 +2191,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -2281,8 +2281,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -2332,8 +2332,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -2377,8 +2377,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 522648358, - "omap_digest": 4294967295, + "data_digest": "0x1f26fb26", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -2420,8 +2420,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 522648358, - "omap_digest": 4294967295, + "data_digest": "0x1f26fb26", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -2606,8 +2606,8 @@ function corrupt_scrub_erasure() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -2657,8 +2657,8 @@ function corrupt_scrub_erasure() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -2731,8 +2731,8 @@ function corrupt_scrub_erasure() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -2837,8 +2837,8 @@ function corrupt_scrub_erasure() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -2894,8 +2894,8 @@ function corrupt_scrub_erasure() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -2945,8 +2945,8 @@ function corrupt_scrub_erasure() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -3003,8 +3003,8 @@ function corrupt_scrub_erasure() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -3098,8 +3098,8 @@ function corrupt_scrub_erasure() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 325996071, - "omap_digest": 4294967295, + "data_digest": "0x136e4e27", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -3254,8 +3254,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -3308,8 +3308,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -3387,8 +3387,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -3499,8 +3499,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -3560,8 +3560,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -3613,8 +3613,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -3676,8 +3676,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -3772,8 +3772,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 325996071, - "omap_digest": 4294967295, + "data_digest": "0x136e4e27", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -3909,8 +3909,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -3963,8 +3963,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -4043,8 +4043,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -4118,8 +4118,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -4230,8 +4230,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -4289,8 +4289,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -4343,8 +4343,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -4407,8 +4407,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 769390837, - "omap_digest": 4294967295, + "data_digest": "0x2ddbf8f5", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -4505,8 +4505,8 @@ EOF ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 325996071, - "omap_digest": 4294967295, + "data_digest": "0x136e4e27", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -4828,8 +4828,8 @@ function TEST_corrupt_snapset_scrub_rep() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 1403826184, - "omap_digest": 4294967295, + "data_digest": "0x53acb008", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, @@ -4915,8 +4915,8 @@ function TEST_corrupt_snapset_scrub_rep() { ], "truncate_seq": 0, "truncate_size": 0, - "data_digest": 1403826184, - "omap_digest": 4294967295, + "data_digest": "0x53acb008", + "omap_digest": "0xffffffff", "expected_object_size": 0, "expected_write_size": 0, "alloc_hint_flags": 0, diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 483c4c9f2103e..ae385da184cf8 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -5215,8 +5215,8 @@ void object_info_t::dump(Formatter *f) const f->close_section(); f->dump_unsigned("truncate_seq", truncate_seq); f->dump_unsigned("truncate_size", truncate_size); - f->dump_unsigned("data_digest", data_digest); - f->dump_unsigned("omap_digest", omap_digest); + f->dump_format("data_digest", "0x%08x", data_digest); + f->dump_format("omap_digest", "0x%08x", omap_digest); f->dump_unsigned("expected_object_size", expected_object_size); f->dump_unsigned("expected_write_size", expected_write_size); f->dump_unsigned("alloc_hint_flags", alloc_hint_flags); -- 2.39.5