|
|
|
@ -153,7 +153,9 @@ func (fs Filesystem) NewMultipartUpload(bucket, object string) (string, *probe.E |
|
|
|
|
return "", probe.NewError(err) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if int64((float64(stfs.Free)/float64(stfs.Total))*100) <= fs.minFreeDisk { |
|
|
|
|
// Remove 5% from total space for cumulative disk space used for journalling, inodes etc.
|
|
|
|
|
availableDiskSpace := (float64(stfs.Free) / (float64(stfs.Total) - (0.05 * float64(stfs.Total)))) * 100 |
|
|
|
|
if int64(availableDiskSpace) <= fs.minFreeDisk { |
|
|
|
|
return "", probe.NewError(RootPathFull{Path: fs.path}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -228,7 +230,9 @@ func (fs Filesystem) CreateObjectPart(bucket, object, uploadID, expectedMD5Sum s |
|
|
|
|
return "", probe.NewError(err) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if int64((float64(stfs.Free)/float64(stfs.Total))*100) <= fs.minFreeDisk { |
|
|
|
|
// Remove 5% from total space for cumulative disk space used for journalling, inodes etc.
|
|
|
|
|
availableDiskSpace := (float64(stfs.Free) / (float64(stfs.Total) - (0.05 * float64(stfs.Total)))) * 100 |
|
|
|
|
if int64(availableDiskSpace) <= fs.minFreeDisk { |
|
|
|
|
return "", probe.NewError(RootPathFull{Path: fs.path}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|