[PR #710] [MERGED] add disk space reservation #1614

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/710
Author: @orozery
Created: 1/29/2018
Status: Merged
Merged: 3/4/2018
Merged by: @ggtakec

Base: masterHead: disk_space_reservation


📝 Commits (1)

  • 8b657ee add disk space reservation

📊 Changes

5 files changed (+102 additions, -56 deletions)

View changed files

📝 doc/man/s3fs.1 (+1 -1)
📝 src/fdcache.cpp (+94 -49)
📝 src/fdcache.h (+5 -1)
📝 src/s3fs.cpp (+1 -4)
📝 src/s3fs_util.cpp (+1 -1)

📄 Description

Details

This PR includes the following changes:

  • Atomically reserving disk space instead of calling IsSafeDiskSpace before Load, and freeing reserved disk-space when Load completes. This is to avoid a race where two or more threads think they have enough disk space to download, but they don't account for each other. If not enough space exists on disk to reserve, then two methods are tried to free up disk space: freeing disk space from the current fd, followed by trying other fd's (when using -o use_cache).
  • Changed EnsureDiskFree setting to be 0 for default (since we have the disk space reservation, we no longer need to default it to MaxParallelCount * MultipartSize).
  • Added some debug printings to cache cleanup methods.
  • Changed cache cleanup method to skip opened fd's (i.e. to clean from the cache only files which are not currently opened).

@ggtakec @gaul would appreciate your review.


🔄 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/710 **Author:** [@orozery](https://github.com/orozery) **Created:** 1/29/2018 **Status:** ✅ Merged **Merged:** 3/4/2018 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `disk_space_reservation` --- ### 📝 Commits (1) - [`8b657ee`](https://github.com/s3fs-fuse/s3fs-fuse/commit/8b657eee412251039b5d7d0d3ea1e728b712be6a) add disk space reservation ### 📊 Changes **5 files changed** (+102 additions, -56 deletions) <details> <summary>View changed files</summary> 📝 `doc/man/s3fs.1` (+1 -1) 📝 `src/fdcache.cpp` (+94 -49) 📝 `src/fdcache.h` (+5 -1) 📝 `src/s3fs.cpp` (+1 -4) 📝 `src/s3fs_util.cpp` (+1 -1) </details> ### 📄 Description ### Details This PR includes the following changes: - Atomically reserving disk space instead of calling IsSafeDiskSpace before Load, and freeing reserved disk-space when Load completes. This is to avoid a race where two or more threads think they have enough disk space to download, but they don't account for each other. If not enough space exists on disk to reserve, then two methods are tried to free up disk space: freeing disk space from the current fd, followed by trying other fd's (when using -o use_cache). - Changed EnsureDiskFree setting to be 0 for default (since we have the disk space reservation, we no longer need to default it to MaxParallelCount * MultipartSize). - Added some debug printings to cache cleanup methods. - Changed cache cleanup method to skip opened fd's (i.e. to clean from the cache only files which are not currently opened). @ggtakec @gaul would appreciate your review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:01:19 +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#1614
No description provided.