@@ -99,6 +99,23 @@ bool ClientRequest::is_pg_op() const
9999 [](auto & op) { return ceph_osd_op_type_pg (op.op .op ); });
100100}
101101
102+ ClientRequest::interruptible_future<>
103+ ClientRequest::reply_op_error (const Ref<PG>& pg, int err)
104+ {
105+ LOG_PREFIX (ClientRequest::reply_op_error);
106+ DEBUGDPP (" {}: replying with error {}" , *pg, *this , err);
107+ auto reply = crimson::make_message<MOSDOpReply>(
108+ m.get (), err, pg->get_osdmap_epoch (),
109+ m->get_flags () & (CEPH_OSD_FLAG_ACK|CEPH_OSD_FLAG_ONDISK),
110+ !m->has_flag (CEPH_OSD_FLAG_RETURNVEC));
111+ reply->set_reply_versions (eversion_t (), 0 );
112+ reply->set_op_returns (std::vector<pg_log_op_return_item_t >{});
113+ // TODO: gate the crosscore sending
114+ return interruptor::make_interruptible (
115+ get_foreign_connection ().send_with_throttling (std::move (reply))
116+ );
117+ }
118+
102119ClientRequest::interruptible_future<> ClientRequest::with_pg_process_interruptible (
103120 Ref<PG> pgref, const unsigned this_instance_id, instance_handle_t &ihref)
104121{
@@ -109,6 +126,15 @@ ClientRequest::interruptible_future<> ClientRequest::with_pg_process_interruptib
109126
110127 DEBUGDPP (" {} start" , *pgref, *this );
111128 PG &pg = *pgref;
129+ if (!m->get_hobj ().get_key ().empty ()) {
130+ // There are no users of locator. It was used to ensure that multipart-upload
131+ // parts would end up in the same PG so that they could be clone_range'd into
132+ // the same object via librados, but that's not how multipart upload works
133+ // anymore and we no longer support clone_range via librados.
134+ get_handle ().exit ();
135+ co_await reply_op_error (pgref, -ENOTSUP);
136+ co_return ;
137+ }
112138 if (pg.can_discard_op (*m)) {
113139 co_await interruptor::make_interruptible (
114140 shard_services->send_incremental_map (
@@ -226,23 +252,6 @@ ClientRequest::process_pg_op(
226252 get_foreign_connection ().send_with_throttling (std::move (reply)));
227253}
228254
229- ClientRequest::interruptible_future<>
230- ClientRequest::reply_op_error (const Ref<PG>& pg, int err)
231- {
232- LOG_PREFIX (ClientRequest::reply_op_error);
233- DEBUGDPP (" {}: replying with error {}" , *pg, *this , err);
234- auto reply = crimson::make_message<MOSDOpReply>(
235- m.get (), err, pg->get_osdmap_epoch (),
236- m->get_flags () & (CEPH_OSD_FLAG_ACK|CEPH_OSD_FLAG_ONDISK),
237- !m->has_flag (CEPH_OSD_FLAG_RETURNVEC));
238- reply->set_reply_versions (eversion_t (), 0 );
239- reply->set_op_returns (std::vector<pg_log_op_return_item_t >{});
240- // TODO: gate the crosscore sending
241- return interruptor::make_interruptible (
242- get_foreign_connection ().send_with_throttling (std::move (reply))
243- );
244- }
245-
246255ClientRequest::interruptible_future<>
247256ClientRequest::process_op (
248257 instance_handle_t &ihref, Ref<PG> pg, unsigned this_instance_id)
0 commit comments