From 828da6527060100462f3f4e90ee21cd8c715c3df Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Mon, 1 Jul 2024 11:29:22 +0800 Subject: [PATCH] feat(auto-balance): replace io.Copy with sparse.SyncLocalFile longhorn/longhorn-4105 Signed-off-by: Chin-Ya Huang --- pkg/sync/rpc/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sync/rpc/server.go b/pkg/sync/rpc/server.go index 29089bc3c..219036450 100644 --- a/pkg/sync/rpc/server.go +++ b/pkg/sync/rpc/server.go @@ -492,7 +492,7 @@ func (s *SyncAgentServer) fileSyncLocal(ctx context.Context, req *enginerpc.File log.Tracef("Copying file %v to %v", sourcePath, targetPath) - err = lhio.CopyFile(sourcePath, targetPath, true) + err = sparse.SyncLocalFile(sourcePath, targetPath) if err != nil { return err }