[PR #745] [MERGED] don't fail mkdir when directory exists #1623

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/745
Author: @orozery
Created: 4/8/2018
Status: Merged
Merged: 5/2/2018
Merged by: @ggtakec

Base: masterHead: handle_mkdir_exists


📝 Commits (1)

  • 4fdab46 don't fail mkdir when directory exists

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/s3fs_util.cpp (+1 -1)

📄 Description

Details

I came across the following error:

s3fs[11960]: [/mys3fsmount]fdcache.cpp:MakeCachePath(1876): failed to create dir((null)) by errno(17).
s3fs[11960]: [/mys3fsmount]fdcache.cpp:OpenMirrorFile(752): could not make bup cache directory path or create it.
s3fs[11960]: [/mys3fsmount]fdcache.cpp:Open(890): failed to open mirror file linked cache file(/s3fscache/ozeri/testfile).

I'm guessing it happened because of a race between two threads that tried to create the ".mirror" directory inside the cache.

To fix it, I added a check to ignore the case where the directory already exists.


🔄 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/745 **Author:** [@orozery](https://github.com/orozery) **Created:** 4/8/2018 **Status:** ✅ Merged **Merged:** 5/2/2018 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `handle_mkdir_exists` --- ### 📝 Commits (1) - [`4fdab46`](https://github.com/s3fs-fuse/s3fs-fuse/commit/4fdab466175f48bfda4fbe2a447b67ef88a76f66) don't fail mkdir when directory exists ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/s3fs_util.cpp` (+1 -1) </details> ### 📄 Description ### Details I came across the following error: s3fs[11960]: [/mys3fsmount]fdcache.cpp:MakeCachePath(1876): failed to create dir((null)) by errno(17). s3fs[11960]: [/mys3fsmount]fdcache.cpp:OpenMirrorFile(752): could not make bup cache directory path or create it. s3fs[11960]: [/mys3fsmount]fdcache.cpp:Open(890): failed to open mirror file linked cache file(/s3fscache/ozeri/testfile). I'm guessing it happened because of a race between two threads that tried to create the ".mirror" directory inside the cache. To fix it, I added a check to ignore the case where the directory already exists. --- <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:22 +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#1623
No description provided.