]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
fix cancel argument for latest liburing (#10168)
authorAkanksha Mahajan <akankshamahajan@fb.com>
Wed, 15 Jun 2022 16:10:19 +0000 (09:10 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 15 Jun 2022 16:10:19 +0000 (09:10 -0700)
Summary:
Pull Request resolved: https://github.com/facebook/rocksdb/pull/10168

the arg changed to u64

Reviewed By: ajkr

Differential Revision: D37155407

fbshipit-source-id: 464eab2806675f148fce075a6fea369fa3d7a9bb

env/fs_posix.cc

index b8797f3a264b34eda454871102a6b26b40700edb..bf204ac9600e908f10dae51c6c48b2744c307522 100644 (file)
@@ -1153,7 +1153,10 @@ class PosixFileSystem : public FileSystem {
       // Prepare the cancel request.
       struct io_uring_sqe* sqe;
       sqe = io_uring_get_sqe(iu);
-      io_uring_prep_cancel(sqe, (void*)(unsigned long)1, 0);
+      // prep_cancel changed API in liburing, but we need to support both old
+      // and new versions so do it by hand
+      io_uring_prep_cancel(sqe, 0, 0);
+      sqe->addr = reinterpret_cast<uint64_t>(posix_handle);
       io_uring_sqe_set_data(sqe, posix_handle);
 
       // submit the request.