#pragma once #include #include #include #include #include class RmDirMsgEx : public MirroredMessage> { public: typedef ErrorCodeResponseState ResponseState; virtual bool processIncoming(ResponseContext& ctx) override; std::tuple lock(EntryLockStore& store) override; static FhgfsOpsErr rmRemoteDirInode(EntryInfo* delEntryInfo); std::unique_ptr executeLocally(ResponseContext& ctx, bool isSecondary) override { return rmDir(ctx, isSecondary); } bool isMirrored() override { return getParentInfo()->getIsBuddyMirrored(); } private: std::unique_ptr rmDir(ResponseContext& ctx, const bool isSecondary); void forwardToSecondary(ResponseContext& ctx) override; FhgfsOpsErr processSecondaryResponse(NetMessage& resp) override { return (FhgfsOpsErr) static_cast(resp).getValue(); } const char* mirrorLogContext() const override { return "RmDirMsgEx/forward"; } };