From: Matan Breizman Date: Wed, 23 Nov 2022 13:25:52 +0000 (+0000) Subject: crimson/osd/osd_operations/client_request: Support FLAG_EIO X-Git-Tag: v18.1.0~829^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b3ecd37136c6a4275156edcc8eaffebf345b46a5;p=ceph.git crimson/osd/osd_operations/client_request: Support FLAG_EIO See 5ac9f523ea263eeb747e2543a667a25de67d07b8 Signed-off-by: Matan Breizman --- diff --git a/src/crimson/osd/osd_operations/client_request.cc b/src/crimson/osd/osd_operations/client_request.cc index 3f2e5c81ba65..858c2dd98433 100644 --- a/src/crimson/osd/osd_operations/client_request.cc +++ b/src/crimson/osd/osd_operations/client_request.cc @@ -287,6 +287,17 @@ ClientRequest::do_process( if (m->has_flag(CEPH_OSD_FLAG_PARALLELEXEC)) { return reply_op_error(pg, -EINVAL); } + const pg_pool_t pool = pg->get_pgpool().info; + if (pool.has_flag(pg_pool_t::FLAG_EIO)) { + // drop op on the floor; the client will handle returning EIO + if (m->has_flag(CEPH_OSD_FLAG_SUPPORTSPOOLEIO)) { + logger().debug("discarding op due to pool EIO flag"); + return seastar::make_ready_future(seq_mode_t::IN_ORDER); + } else { + logger().debug("replying EIO due to pool EIO flag"); + return reply_op_error(pg, -EIO); + } + } if (m->get_oid().name.size() > crimson::common::local_conf()->osd_max_object_name_len) { return reply_op_error(pg, -ENAMETOOLONG);