mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[PR #1722] [MERGED] Fixed a bug in disk free space calculation #2140
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#2140
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/1722
Author: @ggtakec
Created: 7/17/2021
Status: ✅ Merged
Merged: 7/18/2021
Merged by: @gaul
Base:
master← Head:fix_for_mixupload📝 Commits (1)
924adeaFixed a bug in disk free space calculation📊 Changes
3 files changed (+18 additions, -6 deletions)
View changed files
📝
src/fdcache_entity.cpp(+2 -2)📝
src/fdcache_page.cpp(+15 -3)📝
src/fdcache_page.h(+1 -1)📄 Description
Relevant Issue (if applicable)
n/a
Details
There were two problems with the calculation of free disk space.
(1) Call PageList::GetTotalUnloadedPageSize method with size=0
The
PageList::GetTotalUnloadedPageSizemethod should check the entire area whensize=0, but It wasn't able to do this.Fixed this bug by doing the same process as the
PageList::GetUnloadedPagesmethod.(2) Calculation of free space in Mix MultipartUpload
Before #1714, I didn't notice it because I used the same method in all upload modes.
The calculation of free space in the case of Mix MultipartUpload is different from normal Multipart and No Multipart, and it has the feature that the object is not needed to download.
Therefore, the calculation of free space is different, but it was not able to distinguish in same function.
Thus, added an argument to the
GetTotalUnloadedPageSizemethod and modified it so that it does not accumulate if it is larger than the minimum size(for multipart upload).NOTES
Free space testing needs to be enhanced, but I think it can only be achieved by giving s3fs a special debug test mode.
(We should think about it in the future)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.