mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 20:06:37 +00:00
e4c7e12098
Add a dedicated tokio blocking runtime for fsync/fdatasync operations, controlled by RUSTFS_RUNTIME_FSYNC_BLOCKING_THREADS (default 0 = off). When configured with >1 threads, fsync operations are dispatched to a separate blocking pool so device-bound fsync does not starve read operations (pread/stat/open) on the main blocking pool. Changed call sites: - run_file_sync_blocking (batch fdatasync) - fsync_dir (directory fsync) - fsync_open_dst_dir_group (dst dir group fsync) - run_blocking_namespace_file_sync_operation_with_global (namespace+fsync) Unchanged (stay on main pool): - run_blocking_namespace_operation (rename/metadata) - local.rs spawn_blocking calls (pread/stat/open) Default behavior is unchanged (0 = no isolation). Co-Authored-By: heihutu <heihutu@gmail.com>