]>
git.proxmox.com Git - ceph.git/blob - ceph/src/crush/CrushLocation.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #ifndef CEPH_CRUSH_LOCATION_H
5 #define CEPH_CRUSH_LOCATION_H
11 #include "common/ceph_mutex.h"
12 #include "include/common_fwd.h"
14 namespace TOPNSPC::crush
{
18 explicit CrushLocation(CephContext
*c
) : cct(c
) {
22 int update_from_conf(); ///< refresh from config
23 int update_from_hook(); ///< call hook, if present
24 int init_on_startup();
26 std::multimap
<std::string
,std::string
> get_location() const;
29 int _parse(const std::string
& s
);
31 std::multimap
<std::string
,std::string
> loc
;
32 mutable ceph::mutex lock
= ceph::make_mutex("CrushLocation");
35 std::ostream
& operator<<(std::ostream
& os
, const CrushLocation
& loc
);