From d5912059c674660d770cc507b83d1c701868b9f4 Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Wed, 14 Jan 2026 18:38:58 +0530 Subject: [PATCH] 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 --- src/pybind/cephfs/cephfs.pyx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pybind/cephfs/cephfs.pyx b/src/pybind/cephfs/cephfs.pyx index 0aa646a463c9c..23813e72784ff 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: -- 2.47.3