From: dparmar18 Date: Fri, 27 Jan 2023 07:34:33 +0000 (+0530) Subject: mds: add scrub_mdsdir to ScrubHeader X-Git-Tag: v16.2.14~51^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8f7c38064f9a7af0d8cff826f4e27e5e5478e373;p=ceph.git mds: add scrub_mdsdir to ScrubHeader Signed-off-by: Dhairya Parmar (cherry picked from commit c85347fefb1b5a965a6640da9cb48d867642a295) --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index c03d328d512..bb2f2c7d5a5 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 eb79090b007..a5d35f61ce4 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