From: Xavi Hernandez Date: Fri, 11 Apr 2025 14:15:05 +0000 (+0200) Subject: libcephfs_proxy: fully initialize async I/O structure X-Git-Tag: v20.3.0~102^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a5e90ff89b85f2686830a7371348ca0766554cb1;p=ceph.git libcephfs_proxy: fully initialize async I/O structure The ceph_ll_io_info structure has recently been extended to support zerocopy operations. The proxy was initializing just the known members, so, after the zerocopy support, it was passing garbage in some fields, causing failures. This patch completely clears the whole structure to be sure that everything is initialized to its default value. Signed-off-by: Xavi Hernandez --- diff --git a/src/libcephfs_proxy/libcephfsd.c b/src/libcephfs_proxy/libcephfsd.c index b48e88b338b83..a5d9d47e95189 100644 --- a/src/libcephfs_proxy/libcephfsd.c +++ b/src/libcephfs_proxy/libcephfsd.c @@ -1558,12 +1558,12 @@ static int32_t libcephfsd_ll_nonblocking_rw(proxy_client_t *client, } io_info = &async_io->io_info; + memset(io_info, 0, sizeof(struct ceph_ll_io_info)); io_info->callback = libcephfsd_ll_nonblocking_rw_cbk; io_info->priv = (void *)(uintptr_t)req->ll_nonblocking_rw.info; io_info->iov = &async_io->iov; io_info->iovcnt = 1; io_info->off = req->ll_nonblocking_rw.off; - io_info->result = 0; io_info->write = req->ll_nonblocking_rw.write; io_info->fsync = req->ll_nonblocking_rw.fsync; io_info->syncdataonly = req->ll_nonblocking_rw.syncdataonly;