]> git.ipfire.org Git - thirdparty/samba.git/commit
vfs_ceph_new: use libcephfs nonblocking API for async-io ops
authorShachar Sharon <ssharon@redhat.com>
Tue, 1 Oct 2024 09:09:40 +0000 (12:09 +0300)
committerGünther Deschner <gd@samba.org>
Tue, 4 Mar 2025 16:53:21 +0000 (16:53 +0000)
commit4ae9224138449fe7b8dd1e8ce8141aedd014efc4
tree18f6699a9dee09697a5b97cd9918cd1a690acad1
parent6b7b0ec970987a31f47268d31e52238ee1a87107
vfs_ceph_new: use libcephfs nonblocking API for async-io ops

Use libcephfs non-blocking API (ceph_ll_nonblocking_readv_writev[1]) in
combination with smb VFS async hooks ({pread,pwrite,fsync}_send/_recv).
Fills libcephfs' struct ceph_ll_io_info with single iovec and
submit/complete the operation asynchronously on libcephfs side, with
corresponding tevent schedule-immediate upon completion on smbd side.

Control nonblocking/normal I/O mode via config parameter. The common
parts of async I/O (with/without HAVE_CEPH_ASYNCIO) are united.
Specifically, use same struct vfs_ceph_aio_state and common code via
helper function for all async I/O hooks. When HAVE_CEPH_ASYNCIO
is True _and_ config option 'asyncio = yes' use libcephfs asynchronous
I/O API. Otherwise, fake async operation using normal blocking APIs.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15810

[1] https://github.com/ceph/ceph/commit/b4e39f3eccd6734f1ed13c700c136e3aef1777f8

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Mar  4 16:53:21 UTC 2025 on atb-devel-224
source3/modules/vfs_ceph_new.c
source3/wscript