diff options
author | Ramana Raja <rraja@redhat.com> | 2021-05-18 07:00:29 +0200 |
---|---|---|
committer | Ramana Raja <rraja@redhat.com> | 2021-06-17 18:48:59 +0200 |
commit | 75c1c754d14ea300c7123995680a864212104b8c (patch) | |
tree | 5ee3a3fb01648719bf80a6ceb40088ad86947994 /src/messages | |
parent | Merge pull request #41903 from liewegas/update-rook-client (diff) | |
download | ceph-75c1c754d14ea300c7123995680a864212104b8c.tar.xz ceph-75c1c754d14ea300c7123995680a864212104b8c.zip |
mds: remove 'fs_name' from MDSRank
There isn't a need to store a file system's name in a MDSRank
object. The MDSRank has a pointer to a MDSMap object, which already
stores the name.
Also, there isn't a need to pass the file system name in the MMDSMap
message. It should be sufficient to pass the MDSMap in the MMDSMap
message as the the file system name is stored in the MDSMap. Pass a
empty string as map_fs_name in the MMDSMap message. It is simpler than
removing map_fs_name from the message payload altogether.
Fixes: https://tracker.ceph.com/issues/50852
Signed-off-by: Ramana Raja <rraja@redhat.com>
Diffstat (limited to 'src/messages')
-rw-r--r-- | src/messages/MMDSMap.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/messages/MMDSMap.h b/src/messages/MMDSMap.h index 9ea18131127..700cd2121bd 100644 --- a/src/messages/MMDSMap.h +++ b/src/messages/MMDSMap.h @@ -28,7 +28,9 @@ public: uuid_d fsid; epoch_t epoch = 0; ceph::buffer::list encoded; - std::string map_fs_name; + // don't really need map_fs_name. it was accidentally added in 51af2346fdf + // set it to empty string. + std::string map_fs_name = std::string(); version_t get_epoch() const { return epoch; } const ceph::buffer::list& get_encoded() const { return encoded; } @@ -37,10 +39,9 @@ protected: MMDSMap() : SafeMessage{CEPH_MSG_MDS_MAP, HEAD_VERSION, COMPAT_VERSION} {} - MMDSMap(const uuid_d &f, const MDSMap &mm, - const std::string mf = std::string()) : + MMDSMap(const uuid_d &f, const MDSMap &mm) : SafeMessage{CEPH_MSG_MDS_MAP, HEAD_VERSION, COMPAT_VERSION}, - fsid(f), map_fs_name(mf) { + fsid(f) { epoch = mm.get_epoch(); mm.encode(encoded, -1); // we will reencode with fewer features as necessary } |