Merge pull request #56577 from nbalacha/wip-nbalacha-code-cleanup

rbd-mirror: rename on_stop_journal_replay() and some operator<< arguments

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Ilya Dryomov 2024-04-09 16:05:35 +02:00 committed by GitHub
commit 5177c5855f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 21 additions and 21 deletions

View File

@ -591,12 +591,12 @@ void ImageReplayer<I>::stop(Context *on_finish, bool manual, bool restart)
}
if (shut_down_replay) {
on_stop_journal_replay();
on_stop_replay();
}
}
template <typename I>
void ImageReplayer<I>::on_stop_journal_replay(int r, const std::string &desc)
void ImageReplayer<I>::on_stop_replay(int r, const std::string &desc)
{
dout(10) << dendl;
@ -667,7 +667,7 @@ bool ImageReplayer<I>::on_replay_interrupted()
}
if (shut_down) {
on_stop_journal_replay();
on_stop_replay();
}
return shut_down;
}
@ -1050,7 +1050,7 @@ void ImageReplayer<I>::handle_replayer_notification() {
if (m_replayer->is_resync_requested()) {
dout(10) << "resync requested" << dendl;
m_resync_requested = true;
on_stop_journal_replay(0, "resync requested");
on_stop_replay(0, "resync requested");
return;
}
@ -1060,7 +1060,7 @@ void ImageReplayer<I>::handle_replayer_notification() {
dout(10) << "replay interrupted: "
<< "r=" << error_code << ", "
<< "error=" << error_description << dendl;
on_stop_journal_replay(error_code, error_description);
on_stop_replay(error_code, error_description);
return;
}

View File

@ -127,7 +127,7 @@ protected:
* REPLAYING
* |
* v
* JOURNAL_REPLAY_SHUT_DOWN
* REPLAY_SHUT_DOWN
* |
* v
* LOCAL_IMAGE_CLOSE
@ -142,7 +142,7 @@ protected:
bool on_start_interrupted();
bool on_start_interrupted(ceph::mutex& lock);
void on_stop_journal_replay(int r = 0, const std::string &desc = "");
void on_stop_replay(int r = 0, const std::string &desc = "");
bool on_replay_interrupted();

View File

@ -11,19 +11,19 @@ std::ostream &operator<<(std::ostream &os, const ImageId &image_id) {
<< "id=" << image_id.id;
}
std::ostream& operator<<(std::ostream& lhs,
const LocalPoolMeta& rhs) {
return lhs << "mirror_uuid=" << rhs.mirror_uuid;
std::ostream& operator<<(std::ostream& os,
const LocalPoolMeta& local_pool_meta) {
return os << "mirror_uuid=" << local_pool_meta.mirror_uuid;
}
std::ostream& operator<<(std::ostream& lhs,
const RemotePoolMeta& rhs) {
return lhs << "mirror_uuid=" << rhs.mirror_uuid << ", "
"mirror_peer_uuid=" << rhs.mirror_peer_uuid;
std::ostream& operator<<(std::ostream& os,
const RemotePoolMeta& remote_pool_meta) {
return os << "mirror_uuid=" << remote_pool_meta.mirror_uuid << ", "
"mirror_peer_uuid=" << remote_pool_meta.mirror_peer_uuid;
}
std::ostream& operator<<(std::ostream& lhs, const PeerSpec &peer) {
return lhs << "uuid: " << peer.uuid
std::ostream& operator<<(std::ostream& os, const PeerSpec &peer) {
return os << "uuid: " << peer.uuid
<< " cluster: " << peer.cluster_name
<< " client: " << peer.client_name;
}

View File

@ -72,7 +72,7 @@ struct LocalPoolMeta {
std::string mirror_uuid;
};
std::ostream& operator<<(std::ostream& lhs,
std::ostream& operator<<(std::ostream& os,
const LocalPoolMeta& local_pool_meta);
struct RemotePoolMeta {
@ -87,7 +87,7 @@ struct RemotePoolMeta {
std::string mirror_peer_uuid;
};
std::ostream& operator<<(std::ostream& lhs,
std::ostream& operator<<(std::ostream& os,
const RemotePoolMeta& remote_pool_meta);
template <typename I>
@ -114,8 +114,8 @@ struct Peer {
};
template <typename I>
std::ostream& operator<<(std::ostream& lhs, const Peer<I>& peer) {
return lhs << peer.remote_pool_meta;
std::ostream& operator<<(std::ostream& os, const Peer<I>& peer) {
return os << peer.remote_pool_meta;
}
struct PeerSpec {
@ -162,7 +162,7 @@ struct PeerSpec {
}
};
std::ostream& operator<<(std::ostream& lhs, const PeerSpec &peer);
std::ostream& operator<<(std::ostream& os, const PeerSpec &peer);
} // namespace mirror
} // namespace rbd