From d674263eb71e44c98ba357c943b3dbe204a25d11 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 15 Dec 2020 11:39:38 -0800 Subject: [PATCH] fix: remove inode free as part of SameDisk check (#11107) --- pkg/disk/disk.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/disk/disk.go b/pkg/disk/disk.go index 8ba4a3fd2..1ffc15882 100644 --- a/pkg/disk/disk.go +++ b/pkg/disk/disk.go @@ -43,8 +43,8 @@ func SameDisk(di1, di2 Info) bool { return false } - // returns true only if Used, Free and number of free - // inodes are same, then its the same disk. - return di1.Used == di2.Used && di1.Free == di2.Free && - di1.Ffree == di2.Ffree + // returns true only if Used, Free are same, then its the same disk. + // we are deliberately not using free inodes as that is unreliable + // due the fact that Ffree can vary even for temporary files + return di1.Used == di2.Used && di1.Free == di2.Free }