#pragma once #include #include #include #include // set stripe pattern, called by fhgfs-ctl class SetDirPatternMsgEx : public MirroredMessage { public: typedef ErrorCodeResponseState ResponseState; virtual bool processIncoming(ResponseContext& ctx) override; FileIDLock lock(EntryLockStore& store) override { return {&store, getEntryInfo()->getEntryID(), true}; } bool isMirrored() override { return getEntryInfo()->getIsBuddyMirrored(); } private: std::unique_ptr executeLocally(ResponseContext& ctx, bool isSecondary) override; void forwardToSecondary(ResponseContext& ctx) override; FhgfsOpsErr processSecondaryResponse(NetMessage& resp) override { return (FhgfsOpsErr) static_cast(resp).getValue(); } const char* mirrorLogContext() const override { return "SetDirPatternMsgEx/forward"; } };