]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/net: Message::conn needs to be a foreign_ptr
authorSamuel Just <sjust@redhat.com>
Thu, 8 Sep 2022 23:12:45 +0000 (23:12 +0000)
committerSamuel Just <sjust@redhat.com>
Tue, 27 Sep 2022 02:35:41 +0000 (19:35 -0700)
commitb0b3c099623282016d7229625060c6be58606c3c
tree26639493fffb5a5c0c3f3a06963bda5825d93b64
parent5f2c40d0c80abc5c8724184fa4f6956666501d45
crimson/net: Message::conn needs to be a foreign_ptr

There are two main consequences of this:
1. Messages can't be default copy constructed in crimson.  MMonCommand
   seems to be the only user, and we simply add a copy constructor that
   duplicates data portions of the message.
2. We can't casually copy-construct the conn into other structures.
   The main user here is watch/notify.  We use copy() explicitely
   to populate the object_context structures and avoid passing
   ConnectionFRef by value.

Signed-off-by: Samuel Just <sjust@redhat.com>
13 files changed:
src/crimson/mon/MonClient.cc
src/crimson/mon/MonClient.h
src/crimson/net/Fwd.h
src/crimson/osd/ops_executer.cc
src/crimson/osd/ops_executer.h
src/crimson/osd/pg.h
src/crimson/osd/recovery_backend.cc
src/crimson/osd/watch.cc
src/crimson/osd/watch.h
src/messages/MForward.h
src/messages/MMonCommand.h
src/msg/Message.h
src/test/crimson/test_messenger_thrash.cc