mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-04 20:07:54 +00:00
Merge pull request #308 from ggtakec/master
Changed ensure free disk space as additional change for #306
This commit is contained in:
commit
7db23f9d03
@ -1684,13 +1684,13 @@ size_t FdManager::SetEnsureFreeDiskSpace(size_t size)
|
||||
size_t old = FdManager::free_disk_space;
|
||||
if(0 == size){
|
||||
if(0 == FdManager::free_disk_space){
|
||||
FdManager::free_disk_space = static_cast<size_t>(S3fsCurl::GetMultipartSize());
|
||||
FdManager::free_disk_space = static_cast<size_t>(S3fsCurl::GetMultipartSize() * S3fsCurl::GetMaxParallelCount());
|
||||
}
|
||||
}else{
|
||||
if(0 == FdManager::free_disk_space){
|
||||
FdManager::free_disk_space = max(size, static_cast<size_t>(S3fsCurl::GetMultipartSize()));
|
||||
FdManager::free_disk_space = max(size, static_cast<size_t>(S3fsCurl::GetMultipartSize() * S3fsCurl::GetMaxParallelCount()));
|
||||
}else{
|
||||
if(static_cast<size_t>(S3fsCurl::GetMultipartSize()) <= size){
|
||||
if(static_cast<size_t>(S3fsCurl::GetMultipartSize() * S3fsCurl::GetMaxParallelCount()) <= size){
|
||||
FdManager::free_disk_space = size;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user