]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Fix the failure related to io_uring_prep_cancel (#10165)
authorAkanksha Mahajan <akankshamahajan@fb.com>
Tue, 14 Jun 2022 19:35:11 +0000 (12:35 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 14 Jun 2022 19:35:11 +0000 (12:35 -0700)
Summary:
Fix for Internal jobs are failing with
```
 error: no matching function for call to 'io_uring_prep_cancel'
      io_uring_prep_cancel(sqe, posix_handle, 0);
      ^~~~~~~~~~~~~~~~~~~~
note: candidate function not viable: no known conversion from 'rocksdb::Posix_IOHandle *' to '__u64' (aka 'unsigned long long') for 2nd argument
static inline void io_uring_prep_cancel(struct io_uring_sqe *sqe,
```

User data is set using `io_uring_set_data` API so no need to pass posix_handle here.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10165

Test Plan: CircleCI jobs

Reviewed By: jay-zhuang

Differential Revision: D37145233

Pulled By: akankshamahajan15

fbshipit-source-id: 05da650e1240e9c6fcc8aed5f0067308dccb164a

env/fs_posix.cc

index 7cc40425a7532bc729e267980eaf4d7c4b064db1..b8797f3a264b34eda454871102a6b26b40700edb 100644 (file)
@@ -1153,7 +1153,7 @@ class PosixFileSystem : public FileSystem {
       // Prepare the cancel request.
       struct io_uring_sqe* sqe;
       sqe = io_uring_get_sqe(iu);
-      io_uring_prep_cancel(sqe, posix_handle, 0);
+      io_uring_prep_cancel(sqe, (void*)(unsigned long)1, 0);
       io_uring_sqe_set_data(sqe, posix_handle);
 
       // submit the request.