]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/cephfs: invoke fcopyfile() libcephfs API without holding GIL 66927/head
authorVenky Shankar <vshankar@redhat.com>
Wed, 14 Jan 2026 13:08:58 +0000 (18:38 +0530)
committerVenky Shankar <vshankar@redhat.com>
Wed, 14 Jan 2026 13:17:20 +0000 (18:47 +0530)
fcopyfile() performs a read+write cycle on the entire file to be copied.
The python binding invokes this with the GIL held. This causes the GIL
to be held for extended duration causing other python threads to be
blocked on acquiring the GIL when shceduled.

Fixes: http://tracker.ceph.com/issues/74397
Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/pybind/cephfs/cephfs.pyx

index 0aa646a463c9cec77eda32fe3484e48e4be2f1ec..23813e72784ff7e8298d8d121354c7bd0b19f7ab 100644 (file)
@@ -2041,6 +2041,7 @@ cdef class LibCephFS(object):
             char *_dpath = dpath
             mode_t _mode = mode
 
+        with nogil:
             ret = ceph_fcopyfile(self.cluster, _spath, _dpath, _mode)
 
         if ret < 0: