]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
blk/kernel: always use ceph_assert
authorIgor Fedotov <ifedotov@suse.com>
Wed, 20 Mar 2024 12:23:39 +0000 (15:23 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Fri, 19 Jul 2024 11:54:30 +0000 (14:54 +0300)
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
(cherry picked from commit 62c1ed82828f50c37e2197feb3437acd430ed471)

src/blk/kernel/KernelDevice.cc

index 754b44d32a69161251fcde417287bcce976aa21e..31a714a7c8c636d3aacaf2914387138a3c945963 100644 (file)
@@ -338,11 +338,11 @@ void KernelDevice::close()
   extblkdev::release_device(ebd_impl);
 
   for (int i = 0; i < WRITE_LIFE_MAX; i++) {
-    assert(fd_directs[i] >= 0);
+    ceph_assert(fd_directs[i] >= 0);
     VOID_TEMP_FAILURE_RETRY(::close(fd_directs[i]));
     fd_directs[i] = -1;
 
-    assert(fd_buffereds[i] >= 0);
+    ceph_assert(fd_buffereds[i] >= 0);
     VOID_TEMP_FAILURE_RETRY(::close(fd_buffereds[i]));
     fd_buffereds[i] = -1;
   }
@@ -867,7 +867,7 @@ void KernelDevice::aio_submit(IOContext *ioc)
   void *priv = static_cast<void*>(ioc);
   int r, retries = 0;
   // num of pending aios should not overflow when passed to submit_batch()
-  assert(pending <= std::numeric_limits<uint16_t>::max());
+  ceph_assert(pending <= std::numeric_limits<uint16_t>::max());
   r = io_queue->submit_batch(ioc->running_aios.begin(), e,
                             pending, priv, &retries);