mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 01:08:54 +00:00
Don't ignore nomultipart when storage is low
When the temporary storage filled up, the old implementation uploaded all data with multipart uploads, even if "nomultipart" was set. The new implementation emits a warning and returns -ENOSPC instead. Fixes #1595
This commit is contained in:
parent
b589ebec23
commit
ef079f4e94
@ -1481,6 +1481,10 @@ ssize_t FdEntity::Write(const char* bytes, off_t start, size_t size)
|
|||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
// no enough disk space
|
// no enough disk space
|
||||||
|
if (nomultipart) {
|
||||||
|
S3FS_PRN_WARN("Not enough local storage to cache write request: [path=%s][fd=%d][offset=%lld][size=%zu]", path.c_str(), fd, static_cast<long long int>(start), size);
|
||||||
|
return -ENOSPC; // No space left on device
|
||||||
|
}
|
||||||
if(0 != (result = NoCachePreMultipartPost())){
|
if(0 != (result = NoCachePreMultipartPost())){
|
||||||
S3FS_PRN_ERR("failed to switch multipart uploading with no cache(errno=%d)", result);
|
S3FS_PRN_ERR("failed to switch multipart uploading with no cache(errno=%d)", result);
|
||||||
return static_cast<ssize_t>(result);
|
return static_cast<ssize_t>(result);
|
||||||
|
Loading…
Reference in New Issue
Block a user