1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2014 John Spray <john.spray@inktank.com>
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
14 #ifndef MDS_UTILITY_H_
15 #define MDS_UTILITY_H_
17 #include "osdc/Objecter.h"
18 #include "mds/FSMap.h"
19 #include "messages/MFSMap.h"
20 #include "msg/Dispatcher.h"
21 #include "msg/Messenger.h"
22 #include "auth/Auth.h"
23 #include "common/Finisher.h"
24 #include "common/Timer.h"
28 * This class is the parent for MDS utilities, i.e. classes that
29 * need access the objects belonging to the MDS without actually
30 * acting as an MDS daemon themselves.
32 class MDSUtility : public Dispatcher {
42 Context *waiting_for_mds_map;
46 ~MDSUtility() override;
48 void handle_fs_map(MFSMap* m);
49 bool ms_dispatch(Message *m) override;
50 bool ms_handle_reset(Connection *con) override { return false; }
51 void ms_handle_remote_reset(Connection *con) override {}
52 bool ms_handle_refused(Connection *con) override { return false; }
53 bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer,
54 bool force_new) override;
59 #endif /* MDS_UTILITY_H_ */