Skip to content

Commit 5177c58

Browse files
authored
Merge pull request ceph#56577 from nbalacha/wip-nbalacha-code-cleanup
rbd-mirror: rename on_stop_journal_replay() and some operator<< arguments Reviewed-by: Ilya Dryomov <[email protected]>
2 parents 344c1ff + e63b45a commit 5177c58

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

src/tools/rbd_mirror/ImageReplayer.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -591,12 +591,12 @@ void ImageReplayer<I>::stop(Context *on_finish, bool manual, bool restart)
591591
}
592592

593593
if (shut_down_replay) {
594-
on_stop_journal_replay();
594+
on_stop_replay();
595595
}
596596
}
597597

598598
template <typename I>
599-
void ImageReplayer<I>::on_stop_journal_replay(int r, const std::string &desc)
599+
void ImageReplayer<I>::on_stop_replay(int r, const std::string &desc)
600600
{
601601
dout(10) << dendl;
602602

@@ -667,7 +667,7 @@ bool ImageReplayer<I>::on_replay_interrupted()
667667
}
668668

669669
if (shut_down) {
670-
on_stop_journal_replay();
670+
on_stop_replay();
671671
}
672672
return shut_down;
673673
}
@@ -1050,7 +1050,7 @@ void ImageReplayer<I>::handle_replayer_notification() {
10501050
if (m_replayer->is_resync_requested()) {
10511051
dout(10) << "resync requested" << dendl;
10521052
m_resync_requested = true;
1053-
on_stop_journal_replay(0, "resync requested");
1053+
on_stop_replay(0, "resync requested");
10541054
return;
10551055
}
10561056

@@ -1060,7 +1060,7 @@ void ImageReplayer<I>::handle_replayer_notification() {
10601060
dout(10) << "replay interrupted: "
10611061
<< "r=" << error_code << ", "
10621062
<< "error=" << error_description << dendl;
1063-
on_stop_journal_replay(error_code, error_description);
1063+
on_stop_replay(error_code, error_description);
10641064
return;
10651065
}
10661066

src/tools/rbd_mirror/ImageReplayer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class ImageReplayer {
127127
* REPLAYING
128128
* |
129129
* v
130-
* JOURNAL_REPLAY_SHUT_DOWN
130+
* REPLAY_SHUT_DOWN
131131
* |
132132
* v
133133
* LOCAL_IMAGE_CLOSE
@@ -142,7 +142,7 @@ class ImageReplayer {
142142
bool on_start_interrupted();
143143
bool on_start_interrupted(ceph::mutex& lock);
144144

145-
void on_stop_journal_replay(int r = 0, const std::string &desc = "");
145+
void on_stop_replay(int r = 0, const std::string &desc = "");
146146

147147
bool on_replay_interrupted();
148148

src/tools/rbd_mirror/Types.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ std::ostream &operator<<(std::ostream &os, const ImageId &image_id) {
1111
<< "id=" << image_id.id;
1212
}
1313

14-
std::ostream& operator<<(std::ostream& lhs,
15-
const LocalPoolMeta& rhs) {
16-
return lhs << "mirror_uuid=" << rhs.mirror_uuid;
14+
std::ostream& operator<<(std::ostream& os,
15+
const LocalPoolMeta& local_pool_meta) {
16+
return os << "mirror_uuid=" << local_pool_meta.mirror_uuid;
1717
}
1818

19-
std::ostream& operator<<(std::ostream& lhs,
20-
const RemotePoolMeta& rhs) {
21-
return lhs << "mirror_uuid=" << rhs.mirror_uuid << ", "
22-
"mirror_peer_uuid=" << rhs.mirror_peer_uuid;
19+
std::ostream& operator<<(std::ostream& os,
20+
const RemotePoolMeta& remote_pool_meta) {
21+
return os << "mirror_uuid=" << remote_pool_meta.mirror_uuid << ", "
22+
"mirror_peer_uuid=" << remote_pool_meta.mirror_peer_uuid;
2323
}
2424

25-
std::ostream& operator<<(std::ostream& lhs, const PeerSpec &peer) {
26-
return lhs << "uuid: " << peer.uuid
25+
std::ostream& operator<<(std::ostream& os, const PeerSpec &peer) {
26+
return os << "uuid: " << peer.uuid
2727
<< " cluster: " << peer.cluster_name
2828
<< " client: " << peer.client_name;
2929
}

src/tools/rbd_mirror/Types.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ struct LocalPoolMeta {
7272
std::string mirror_uuid;
7373
};
7474

75-
std::ostream& operator<<(std::ostream& lhs,
75+
std::ostream& operator<<(std::ostream& os,
7676
const LocalPoolMeta& local_pool_meta);
7777

7878
struct RemotePoolMeta {
@@ -87,7 +87,7 @@ struct RemotePoolMeta {
8787
std::string mirror_peer_uuid;
8888
};
8989

90-
std::ostream& operator<<(std::ostream& lhs,
90+
std::ostream& operator<<(std::ostream& os,
9191
const RemotePoolMeta& remote_pool_meta);
9292

9393
template <typename I>
@@ -114,8 +114,8 @@ struct Peer {
114114
};
115115

116116
template <typename I>
117-
std::ostream& operator<<(std::ostream& lhs, const Peer<I>& peer) {
118-
return lhs << peer.remote_pool_meta;
117+
std::ostream& operator<<(std::ostream& os, const Peer<I>& peer) {
118+
return os << peer.remote_pool_meta;
119119
}
120120

121121
struct PeerSpec {
@@ -162,7 +162,7 @@ struct PeerSpec {
162162
}
163163
};
164164

165-
std::ostream& operator<<(std::ostream& lhs, const PeerSpec &peer);
165+
std::ostream& operator<<(std::ostream& os, const PeerSpec &peer);
166166

167167
} // namespace mirror
168168
} // namespace rbd

0 commit comments

Comments
 (0)