[PR #1722] [MERGED] Fixed a bug in disk free space calculation #2140

Closed
opened 2026-03-04 02:03:57 +03:00 by kerem · 0 comments
Owner

📋 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: masterHead: fix_for_mixupload


📝 Commits (1)

  • 924adea Fixed 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::GetTotalUnloadedPageSize method should check the entire area when size=0, but It wasn't able to do this.
Fixed this bug by doing the same process as the PageList::GetUnloadedPages method.

(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 GetTotalUnloadedPageSize method 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.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/1722 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 7/17/2021 **Status:** ✅ Merged **Merged:** 7/18/2021 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `fix_for_mixupload` --- ### 📝 Commits (1) - [`924adea`](https://github.com/s3fs-fuse/s3fs-fuse/commit/924adea497895e88bc1e841c72b7d2b7bb4352ed) Fixed a bug in disk free space calculation ### 📊 Changes **3 files changed** (+18 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/fdcache_entity.cpp` (+2 -2) 📝 `src/fdcache_page.cpp` (+15 -3) 📝 `src/fdcache_page.h` (+1 -1) </details> ### 📄 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::GetTotalUnloadedPageSize` method should check the entire area when `size=0`, but It wasn't able to do this. Fixed this bug by doing the same process as the `PageList::GetUnloadedPages` method. ### (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 `GetTotalUnloadedPageSize` method 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:03:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#2140
No description provided.