[GH-ISSUE #1563] Default stat_cache_expire not taking effect #820

Closed
opened 2026-03-04 01:49:05 +03:00 by kerem · 1 comment
Owner

Originally created by @lincheney on GitHub (Feb 10, 2021).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1563

Additional Information

The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all.
Keep in mind that the commands we provide to retrieve information are oriented to GNU/Linux Distributions, so you could need to use others if you use s3fs on macOS or BSD

Version of s3fs being used (s3fs --version)

example: 1.00
V1.86 (commit:e2fbcb4)

Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)

example: 2.9.4
2.9.2

Kernel information (uname -r)

command result: uname -r
3.10.0-1127.10.1.el7.x86_64

GNU/Linux Distribution, if applicable (cat /etc/os-release)

command result: cat /etc/os-release

NAME="Red Hat Enterprise Linux Server"
VERSION="7.8 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.8"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.8 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.8:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.8
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.8"

s3fs command line used, if applicable

/etc/fstab entry, if applicable

bucket-name /mountpoint fuse.s3fs _netdev,allow_other,uid=1000,gid=1000 0 0

s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs)

if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages

Details about issue

The man page specifies that the -o stat_cache_expire (default is 900), but this does not appear to be the case, stat cache seems to last forever.
If the stat_cache_expire option is explicitly set to a value, then the caching expiry works.

I believe this may be due to IsExpireTime still being set to false by default:
https://github.com/s3fs-fuse/s3fs-fuse/blob/master/src/cache.cpp#L153

Originally created by @lincheney on GitHub (Feb 10, 2021). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1563 ### Additional Information _The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all._ _Keep in mind that the commands we provide to retrieve information are oriented to GNU/Linux Distributions, so you could need to use others if you use s3fs on macOS or BSD_ #### Version of s3fs being used (s3fs --version) _example: 1.00_ V1.86 (commit:e2fbcb4) #### Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse) _example: 2.9.4_ 2.9.2 #### Kernel information (uname -r) _command result: uname -r_ 3.10.0-1127.10.1.el7.x86_64 #### GNU/Linux Distribution, if applicable (cat /etc/os-release) _command result: cat /etc/os-release_ ``` NAME="Red Hat Enterprise Linux Server" VERSION="7.8 (Maipo)" ID="rhel" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="7.8" PRETTY_NAME="Red Hat Enterprise Linux Server 7.8 (Maipo)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:7.8:GA:server" HOME_URL="https://www.redhat.com/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7" REDHAT_BUGZILLA_PRODUCT_VERSION=7.8 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="7.8" ``` #### s3fs command line used, if applicable ``` ``` #### /etc/fstab entry, if applicable ``` bucket-name /mountpoint fuse.s3fs _netdev,allow_other,uid=1000,gid=1000 0 0 ``` #### s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs) _if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages_ ``` ``` ### Details about issue The man page specifies that the `-o stat_cache_expire (default is 900)`, but this does not appear to be the case, stat cache seems to last forever. If the `stat_cache_expire` option is explicitly set to a value, then the caching expiry works. I believe this may be due to `IsExpireTime` still being set to false by default: https://github.com/s3fs-fuse/s3fs-fuse/blob/master/src/cache.cpp#L153
kerem closed this issue 2026-03-04 01:49:05 +03:00
Author
Owner

@gaul commented on GitHub (Feb 10, 2021):

This makes sense. Could you test this locally and submit a pull request to correct this value?

<!-- gh-comment-id:776644609 --> @gaul commented on GitHub (Feb 10, 2021): This makes sense. Could you test this locally and submit a pull request to correct this value?
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#820
No description provided.