xl: Disable rename2 in decommissioning/rebalance (#18964)

Always disable rename2 optimization in decom/rebalance
This commit is contained in:
Anis Eleuch
2024-02-03 23:03:30 +01:00
committed by GitHub
parent 960d604013
commit 6ae97aedc9
8 changed files with 40 additions and 11 deletions

View File

@@ -2629,7 +2629,7 @@ func (s *xlStorage) RenameData(ctx context.Context, srcVolume, srcPath string, f
}
diskHealthCheckOK(ctx, err)
if !fi.Versioned && !fi.Healing() {
if !fi.Versioned && !fi.DataMov() && !fi.Healing() {
// Use https://man7.org/linux/man-pages/man2/rename.2.html if possible on unversioned bucket.
if err := Rename2(pathutil.Join(srcVolumeDir, srcPath), pathutil.Join(dstVolumeDir, dstPath)); err == nil {
return sign, nil