diff options
author | Akanksha Mahajan <akankshamahajan@fb.com> | 2022-06-15 09:10:19 -0700 |
---|---|---|
committer | Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> | 2022-06-15 09:10:19 -0700 |
commit | 19345de60dab6a9841e2bb04826ed87b2c44a64e (patch) | |
tree | 352c93bd10b51f59394fbae40346ad15a5e66d1f | |
parent | 40dfa260497c9f482c5dd3a2eb4c362914edeb9f (diff) |
fix cancel argument for latest liburing (#10168)
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
-rw-r--r-- | env/fs_posix.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/env/fs_posix.cc b/env/fs_posix.cc index b8797f3a2..bf204ac96 100644 --- a/env/fs_posix.cc +++ b/env/fs_posix.cc @@ -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. |