fix: remove inode free as part of SameDisk check (#11107)

master
Harshavardhana 4 years ago committed by GitHub
parent e7d3b49a20
commit d674263eb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      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
}

Loading…
Cancel
Save