]> 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)
committerJule Anger <janger@samba.org>
Thu, 13 Mar 2025 15:31:09 +0000 (15:31 +0000)
commit101c2999830fd83662fa98bb4a7646121cd18040
tree88fb40bd51ae5f8f3b25e3890f473880712bc6e3
parentf04ad3933b5b1504ee24125f842593de6e27a698
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

(cherry picked from commit 4ae9224138449fe7b8dd1e8ce8141aedd014efc4)
source3/modules/vfs_ceph_new.c
source3/wscript