From: Venky Shankar Date: Wed, 14 Jan 2026 13:08:58 +0000 (+0530) Subject: pybind/cephfs: invoke fcopyfile() libcephfs API without holding GIL X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F66927%2Fhead;p=ceph.git pybind/cephfs: invoke fcopyfile() libcephfs API without holding GIL 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 --- diff --git a/src/pybind/cephfs/cephfs.pyx b/src/pybind/cephfs/cephfs.pyx index 0aa646a463c..23813e72784 100644 --- a/src/pybind/cephfs/cephfs.pyx +++ b/src/pybind/cephfs/cephfs.pyx @@ -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: