Skip to content

Commit a5e90ff

Browse files
committed
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 <[email protected]>
1 parent e3f06b8 commit a5e90ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcephfs_proxy/libcephfsd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1558,12 +1558,12 @@ static int32_t libcephfsd_ll_nonblocking_rw(proxy_client_t *client,
15581558
}
15591559
io_info = &async_io->io_info;
15601560

1561+
memset(io_info, 0, sizeof(struct ceph_ll_io_info));
15611562
io_info->callback = libcephfsd_ll_nonblocking_rw_cbk;
15621563
io_info->priv = (void *)(uintptr_t)req->ll_nonblocking_rw.info;
15631564
io_info->iov = &async_io->iov;
15641565
io_info->iovcnt = 1;
15651566
io_info->off = req->ll_nonblocking_rw.off;
1566-
io_info->result = 0;
15671567
io_info->write = req->ll_nonblocking_rw.write;
15681568
io_info->fsync = req->ll_nonblocking_rw.fsync;
15691569
io_info->syncdataonly = req->ll_nonblocking_rw.syncdataonly;

0 commit comments

Comments
 (0)