]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/rbm: add handle_exception() to pass_through_io()
authormyoungwon oh <ohmyoungwon@gmail.com>
Fri, 12 Jul 2024 04:13:13 +0000 (04:13 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Mon, 19 Aug 2024 09:49:38 +0000 (09:49 +0000)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
(cherry picked from commit 169a81ee51bd62f120dff5d4618f1a9eeec12fd9)

src/crimson/os/seastore/random_block_manager/nvme_block_device.cc

index 039f573f41d3f7a2f3c04fc9acc182d5d656d468..eb7070d5de177f73fe82eb85dff67a65bb3311ed 100644 (file)
@@ -306,7 +306,11 @@ nvme_command_ertr::future<int> NVMeBlockDevice::pass_admin(
 
 nvme_command_ertr::future<int> 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<int> {
+    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() {