]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_ceph_new: dont use ceph_ll_nonblocking_readv_writev for fsync_send
authorShachar Sharon <ssharon@redhat.com>
Wed, 17 Sep 2025 11:25:27 +0000 (14:25 +0300)
committerJule Anger <janger@samba.org>
Thu, 25 Sep 2025 12:12:14 +0000 (12:12 +0000)
Commit 4ae922413844 ("vfs_ceph_new: use libcephfs nonblocking API for
async-io ops") uses ceph_ll_nonblocking_readv_writev for fsync_send.
However, the actual behaviour of libcephfs when using this API with
'fsync=true' is not async-fsync, as one may assume. Instead,
vfs_ceph_new should use a nonblocking fsync API[1], once it is ready.

Removed the usage of ceph_ll_nonblocking_readv_writev for fsync.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15919

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

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Xavi Hernandez <xhernandez@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 82c0988a8bc3d3e364e2d56ad8ea27e359fbc3f0)

source3/modules/vfs_ceph_new.c

index b97279982cd4c0ea3f25ef6e6a991a567682b34d..6c50be9bd10b65b0635e17f25e1e66a091d79e8d 100644 (file)
@@ -2972,16 +2972,6 @@ static struct tevent_req *vfs_ceph_fsync_send(struct vfs_handle_struct *handle,
                                     0);
        SMBPROFILE_BYTES_ASYNC_SET_IDLE(state->profile_bytes);
 
-#if HAVE_CEPH_ASYNCIO
-       state->req = req;
-       state->data = NULL;
-       state->len = 0;
-       state->off = 0;
-       state->fsync = true;
-       vfs_ceph_aio_submit(handle, req, ev);
-       return req;
-#endif
-
        vfs_ceph_aio_start(state);
        ret = vfs_ceph_ll_fsync(handle, state->cfh, false);
        vfs_ceph_aio_finish(state, ret);