From: myoungwon oh Date: Fri, 12 Jul 2024 04:13:13 +0000 (+0000) Subject: crimson/os/seastore/rbm: add handle_exception() to pass_through_io() X-Git-Tag: v19.2.1~279^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=db2876c63337dfcd36632b0e9571a18bcda97644;p=ceph.git crimson/os/seastore/rbm: add handle_exception() to pass_through_io() Signed-off-by: Myoungwon Oh (cherry picked from commit 169a81ee51bd62f120dff5d4618f1a9eeec12fd9) --- diff --git a/src/crimson/os/seastore/random_block_manager/nvme_block_device.cc b/src/crimson/os/seastore/random_block_manager/nvme_block_device.cc index 039f573f41d3f..eb7070d5de177 100644 --- a/src/crimson/os/seastore/random_block_manager/nvme_block_device.cc +++ b/src/crimson/os/seastore/random_block_manager/nvme_block_device.cc @@ -306,7 +306,11 @@ nvme_command_ertr::future NVMeBlockDevice::pass_admin( nvme_command_ertr::future NVMeBlockDevice::pass_through_io( nvme_io_command_t& io_cmd) { - return device.ioctl(NVME_IOCTL_IO_CMD, &io_cmd); + return device.ioctl(NVME_IOCTL_IO_CMD, &io_cmd + ).handle_exception([](auto e)->nvme_command_ertr::future { + logger().error("pass_through_io: ioctl failed {}", e); + return crimson::ct_error::input_output_error::make(); + }); } nvme_command_ertr::future<> NVMeBlockDevice::try_enable_end_to_end_protection() {