From: Jaya Prakash Date: Mon, 8 Dec 2025 13:35:59 +0000 (+0000) Subject: osd: add flag to identify scrub IO X-Git-Tag: testing/wip-pdonnell-testing-20260210.165938~20^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cd4dc8640dec02070687fd99439214b876f2dbd1;p=ceph-ci.git osd: add flag to identify scrub IO This commit introduces a new operation flag `CEPH_OSD_OP_FLAG_SCRUB` to explicitly mark requests originating from scrub or deep-scrub workflows. The flag allows BlueStore to differentiate scrub IO from normal operations. Signed-off-by: Jaya Prakash --- diff --git a/src/osd/ECCommon.h b/src/osd/ECCommon.h index d98ac2cb499..24f48e822ff 100644 --- a/src/osd/ECCommon.h +++ b/src/osd/ECCommon.h @@ -72,7 +72,7 @@ struct ECCommon { static inline const uint32_t scrub_fadvise_flags{ CEPH_OSD_OP_FLAG_FADVISE_SEQUENTIAL | CEPH_OSD_OP_FLAG_FADVISE_DONTNEED | - CEPH_OSD_OP_FLAG_BYPASS_CLEAN_CACHE}; + CEPH_OSD_OP_FLAG_SCRUB}; virtual ~ECCommon() = default; diff --git a/src/osd/ECCommonL.h b/src/osd/ECCommonL.h index 324870e2d12..4fd67e9203e 100644 --- a/src/osd/ECCommonL.h +++ b/src/osd/ECCommonL.h @@ -68,7 +68,7 @@ struct ECCommonL { static inline const uint32_t scrub_fadvise_flags{ CEPH_OSD_OP_FLAG_FADVISE_SEQUENTIAL | CEPH_OSD_OP_FLAG_FADVISE_DONTNEED | - CEPH_OSD_OP_FLAG_BYPASS_CLEAN_CACHE}; + CEPH_OSD_OP_FLAG_SCRUB}; virtual ~ECCommonL() = default; @@ -697,4 +697,4 @@ template <> struct fmt::formatter struct fmt::formatter : fmt::ostream_formatter {}; template <> struct fmt::formatter : fmt::ostream_formatter {}; template <> struct fmt::formatter : fmt::ostream_formatter {}; -template <> struct fmt::formatter : fmt::ostream_formatter {}; \ No newline at end of file +template <> struct fmt::formatter : fmt::ostream_formatter {}; diff --git a/src/osd/ReplicatedBackend.h b/src/osd/ReplicatedBackend.h index aab3c751442..4ce6c3aa34e 100644 --- a/src/osd/ReplicatedBackend.h +++ b/src/osd/ReplicatedBackend.h @@ -466,7 +466,7 @@ private: static inline const uint32_t scrub_fadvise_flags{ CEPH_OSD_OP_FLAG_FADVISE_SEQUENTIAL | CEPH_OSD_OP_FLAG_FADVISE_DONTNEED | - CEPH_OSD_OP_FLAG_BYPASS_CLEAN_CACHE}; + CEPH_OSD_OP_FLAG_SCRUB}; int be_deep_scrub( const Scrub::ScrubCounterSet& io_counters, diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 91adfdd40f6..7c7e87b6549 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -152,8 +152,8 @@ const char * ceph_osd_op_flag_name(unsigned flag) case CEPH_OSD_OP_FLAG_WITH_REFERENCE: name = "with_reference"; break; - case CEPH_OSD_OP_FLAG_BYPASS_CLEAN_CACHE: - name = "bypass_clean_cache"; + case CEPH_OSD_OP_FLAG_SCRUB: + name = "scrub"; break; default: name = "???";