[PR #636] [MERGED] Fix intermittent upload failures on macOS #1578

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/636
Author: @swt2c
Created: 9/7/2017
Status: Merged
Merged: 9/17/2017
Merged by: @ggtakec

Base: masterHead: macos_upload_failures


📝 Commits (1)

  • 20da0e4 Fix intermittent upload failures on macOS

📊 Changes

2 files changed (+4 additions, -4 deletions)

View changed files

📝 src/fdcache.cpp (+3 -3)
📝 src/fdcache.h (+1 -1)

📄 Description

There were multiple problems with the FdManager::GetFreeDiskSpace() function
on macOS:

  1. When calling statvfs(), f_frsize should be used instead of f_bsize when converting available blocks to bytes. This was causing the free space calculation to be incorrect.
  2. On macOS, fsblkcnt_t is a 32-bit integer. Thus, when calculating available disk space, there were frequently overflows. This caused s3fs to incorrectly determine that the cache location was out of space in the middle of a transfer which caused uploads to fail. Changing this to a uint64_t resolves the problem.

Resolves issue #634.


🔄 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/636 **Author:** [@swt2c](https://github.com/swt2c) **Created:** 9/7/2017 **Status:** ✅ Merged **Merged:** 9/17/2017 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `macos_upload_failures` --- ### 📝 Commits (1) - [`20da0e4`](https://github.com/s3fs-fuse/s3fs-fuse/commit/20da0e4dd3c2536424a9191f8ced27340b452a43) Fix intermittent upload failures on macOS ### 📊 Changes **2 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/fdcache.cpp` (+3 -3) 📝 `src/fdcache.h` (+1 -1) </details> ### 📄 Description There were multiple problems with the FdManager::GetFreeDiskSpace() function on macOS: 1) When calling statvfs(), f_frsize should be used instead of f_bsize when converting available blocks to bytes. This was causing the free space calculation to be incorrect. 2) On macOS, fsblkcnt_t is a 32-bit integer. Thus, when calculating available disk space, there were frequently overflows. This caused s3fs to incorrectly determine that the cache location was out of space in the middle of a transfer which caused uploads to fail. Changing this to a uint64_t resolves the problem. Resolves issue #634. --- <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:08 +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#1578
No description provided.