From 8f7c38064f9a7af0d8cff826f4e27e5e5478e373 Mon Sep 17 00:00:00 2001 From: dparmar18 Date: Fri, 27 Jan 2023 13:04:33 +0530 Subject: [PATCH] mds: add scrub_mdsdir to ScrubHeader Signed-off-by: Dhairya Parmar (cherry picked from commit c85347fefb1b5a965a6640da9cb48d867642a295) --- src/mds/MDCache.cc | 3 ++- src/mds/ScrubHeader.h | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index c03d328d512aa..bb2f2c7d5a59b 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -12824,7 +12824,8 @@ void MDCache::enqueue_scrub( } cs = new C_MDS_EnqueueScrub(tag_str, f, fin); } - cs->header = std::make_shared(tag_str, is_internal, force, recursive, repair); + cs->header = std::make_shared(tag_str, is_internal, force, + recursive, repair, scrub_mdsdir); mdr->internal_op_finish = cs; enqueue_scrub_work(mdr); diff --git a/src/mds/ScrubHeader.h b/src/mds/ScrubHeader.h index eb79090b0073c..a5d35f61ce428 100644 --- a/src/mds/ScrubHeader.h +++ b/src/mds/ScrubHeader.h @@ -35,9 +35,9 @@ class CInode; class ScrubHeader { public: ScrubHeader(std::string_view tag_, bool is_tag_internal_, bool force_, - bool recursive_, bool repair_) + bool recursive_, bool repair_, bool scrub_mdsdir_ = false) : tag(tag_), is_tag_internal(is_tag_internal_), force(force_), - recursive(recursive_), repair(repair_) {} + recursive(recursive_), repair(repair_), scrub_mdsdir(scrub_mdsdir_) {} // Set after construction because it won't be known until we've // started resolving path and locking @@ -46,6 +46,7 @@ public: bool get_recursive() const { return recursive; } bool get_repair() const { return repair; } bool get_force() const { return force; } + bool get_scrub_mdsdir() const { return scrub_mdsdir; } bool is_internal_tag() const { return is_tag_internal; } inodeno_t get_origin() const { return origin; } const std::string& get_tag() const { return tag; } @@ -69,6 +70,7 @@ protected: const bool force; const bool recursive; const bool repair; + const bool scrub_mdsdir; inodeno_t origin; bool repaired = false; // May be set during scrub if repairs happened -- 2.39.5