Adjust internal fallocate interface to changed io_uring interface

with 6abc7c970dd5be381e588b9d0234c385a5a6d0d7 in liburing,
io_uring_prep_fallocate() arguments were (rightly) changed
from off_t to __u64.

Reflect this change. Also note that our struct fellow_io_discard
already used uint64_t.

Reported by Flexelint
parent 4723e570
......@@ -54,7 +54,7 @@ int fellow_io_write_async_enq(fellow_ioctx_t *ctx,
int fellow_io_read_async_enq(fellow_ioctx_t *ctx,
uint64_t info, void *buf, size_t bytes, off_t off);
int fellow_io_fallocate_enq(fellow_ioctx_t *ctxp, uint64_t info,
int mode, off_t offset, off_t len);
int mode, uint64_t offset, uint64_t len);
unsigned fellow_io_blkdiscard_enq(fellow_ioctx_t *ctxp, uint64_t info,
const struct fellow_io_discard *discards, unsigned n);
......
......@@ -303,7 +303,7 @@ fellow_io_write_async_enq(fellow_ioctx_t *ctxp,
int
fellow_io_fallocate_enq(fellow_ioctx_t *ctxp, uint64_t info,
int mode, off_t offset, off_t len)
int mode, uint64_t offset, uint64_t len)
{
struct fellow_io_thread_r *req;
struct fellow_io_thread *ctx;
......@@ -318,7 +318,7 @@ fellow_io_fallocate_enq(fellow_ioctx_t *ctxp, uint64_t info,
req->cmd = FIOT_FALLOCATE;
req->mode = mode;
req->bytes = (size_t)len;
req->off = offset;
req->off = (off_t)offset;
req->status.info = info;
AZ(ctx->taskrun(fellow_io_thread_task, req,
......
......@@ -471,7 +471,7 @@ fellow_io_write_async_enq(fellow_ioctx_t *ctxp,
int
fellow_io_fallocate_enq(fellow_ioctx_t *ctxp, uint64_t info,
int mode, off_t offset, off_t len)
int mode, uint64_t offset, uint64_t len)
{
struct fellow_io_uring *ctx;
struct io_uring_sqe *sqe;
......
......@@ -1659,7 +1659,7 @@ fellow_io_regions_discard(struct fellow_fd *ffd, void *ioctx,
r = fellow_io_fallocate_enq(ioctx,
faio_ptr_info(FAIOT_DISCARD, NULL),
FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE,
(off_t)todo->offset, (off_t)todo->len);
todo->offset, todo->len);
if (r) {
todo++;
n--;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment