[PR #1680] [MERGED] Allow configuration for temporary files directory #2110

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/1680
Author: @CarstenGrohmann
Created: 6/13/2021
Status: Merged
Merged: 6/16/2021
Merged by: @gaul

Base: masterHead: tmpfile


📝 Commits (1)

  • 91f6cbe Allow configuration for temporary files directory

📊 Changes

7 files changed (+90 additions, -36 deletions)

View changed files

📝 Makefile.am (+0 -1)
📝 doc/man/s3fs.1 (+3 -0)
📝 src/fdcache.cpp (+63 -31)
📝 src/fdcache.h (+5 -0)
📝 src/fdcache_entity.cpp (+4 -4)
📝 src/s3fs.cpp (+12 -0)
📝 src/s3fs_help.cpp (+3 -0)

📄 Description

In the old version of s3fs, the directory for temporary files could only be set at compile time via P_tmpdir. With the new option tmpdir, on the other hand, the directory can be adjusted every time s3fs is started.

This eliminates the need to build your own versions if you want to use a different location for temporary files.

Old behaviour:

# ./s3fs mybucket /grid/cfm2 -o url=http://mys3service:8088,curldbg,dbglevel=debug -d -d -f
2021-06-09T11:51:05.886Z [INF] s3fs version 1.89(8c58ba8) : s3fs -o url=http://mys3service:8088,curldbg,dbglevel=debug -d -d -f mybucket /grid/cfm2
[...]

# ll /proc/$(pidof s3fs)/fd
total 0
lrwx------ 1 root root 64 Jun  9 13:51 0 -> /dev/pts/4
lrwx------ 1 root root 64 Jun  9 13:51 1 -> /dev/pts/4
lrwx------ 1 root root 64 Jun  9 13:51 2 -> /dev/pts/4
lrwx------ 1 root root 64 Jun  9 13:51 3 -> /dev/fuse
lrwx------ 1 root root 64 Jun  9 13:51 4 -> socket:[163981604]
lrwx------ 1 root root 64 Jun  9 13:51 5 -> /tmp/s3fstmp.cLjmfM (deleted)

New behaviour:

# ./s3fs mybucket /grid/cfm2 -o url=http://mys3service:8088,curldbg,dbglevel=debug -d -d -f -o tmpdir=/external_disk
2021-06-09T11:54:25.766Z [INF] s3fs version 1.89(8c58ba8) : s3fs -o url=http://mys3service:8088,curldbg,dbglevel=debug -d -d -f -o tmpdir=/external_disk mybucket /grid/cfm2
[...]

# ll /proc/$(pidof s3fs)/fd
total 0
lrwx------ 1 root root 64 Jun  9 13:54 0 -> /dev/pts/4
lrwx------ 1 root root 64 Jun  9 13:54 1 -> /dev/pts/4
lrwx------ 1 root root 64 Jun  9 13:54 2 -> /dev/pts/4
lrwx------ 1 root root 64 Jun  9 13:54 3 -> /dev/fuse
lrwx------ 1 root root 64 Jun  9 13:54 4 -> socket:[163981605]
lrwx------ 1 root root 64 Jun  9 13:54 5 -> /external_disk/s3fstmp.Dvmr78 (deleted)

🔄 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/1680 **Author:** [@CarstenGrohmann](https://github.com/CarstenGrohmann) **Created:** 6/13/2021 **Status:** ✅ Merged **Merged:** 6/16/2021 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `tmpfile` --- ### 📝 Commits (1) - [`91f6cbe`](https://github.com/s3fs-fuse/s3fs-fuse/commit/91f6cbe20950cd19646e91f38dca374357a7bcf0) Allow configuration for temporary files directory ### 📊 Changes **7 files changed** (+90 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `Makefile.am` (+0 -1) 📝 `doc/man/s3fs.1` (+3 -0) 📝 `src/fdcache.cpp` (+63 -31) 📝 `src/fdcache.h` (+5 -0) 📝 `src/fdcache_entity.cpp` (+4 -4) 📝 `src/s3fs.cpp` (+12 -0) 📝 `src/s3fs_help.cpp` (+3 -0) </details> ### 📄 Description In the old version of s3fs, the directory for temporary files could only be set at compile time via `P_tmpdir`. With the new option `tmpdir`, on the other hand, the directory can be adjusted every time s3fs is started. This eliminates the need to build your own versions if you want to use a different location for temporary files. **Old behaviour:** ``` # ./s3fs mybucket /grid/cfm2 -o url=http://mys3service:8088,curldbg,dbglevel=debug -d -d -f 2021-06-09T11:51:05.886Z [INF] s3fs version 1.89(8c58ba8) : s3fs -o url=http://mys3service:8088,curldbg,dbglevel=debug -d -d -f mybucket /grid/cfm2 [...] # ll /proc/$(pidof s3fs)/fd total 0 lrwx------ 1 root root 64 Jun 9 13:51 0 -> /dev/pts/4 lrwx------ 1 root root 64 Jun 9 13:51 1 -> /dev/pts/4 lrwx------ 1 root root 64 Jun 9 13:51 2 -> /dev/pts/4 lrwx------ 1 root root 64 Jun 9 13:51 3 -> /dev/fuse lrwx------ 1 root root 64 Jun 9 13:51 4 -> socket:[163981604] lrwx------ 1 root root 64 Jun 9 13:51 5 -> /tmp/s3fstmp.cLjmfM (deleted) ``` **New behaviour:** ``` # ./s3fs mybucket /grid/cfm2 -o url=http://mys3service:8088,curldbg,dbglevel=debug -d -d -f -o tmpdir=/external_disk 2021-06-09T11:54:25.766Z [INF] s3fs version 1.89(8c58ba8) : s3fs -o url=http://mys3service:8088,curldbg,dbglevel=debug -d -d -f -o tmpdir=/external_disk mybucket /grid/cfm2 [...] # ll /proc/$(pidof s3fs)/fd total 0 lrwx------ 1 root root 64 Jun 9 13:54 0 -> /dev/pts/4 lrwx------ 1 root root 64 Jun 9 13:54 1 -> /dev/pts/4 lrwx------ 1 root root 64 Jun 9 13:54 2 -> /dev/pts/4 lrwx------ 1 root root 64 Jun 9 13:54 3 -> /dev/fuse lrwx------ 1 root root 64 Jun 9 13:54 4 -> socket:[163981605] lrwx------ 1 root root 64 Jun 9 13:54 5 -> /external_disk/s3fstmp.Dvmr78 (deleted) ``` --- <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:44 +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#2110
No description provided.