From f5ee325e9bcc58b454c47d179732d5f7c46d0593 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 2807e7567..34e553e3d 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 }