[GH-ISSUE #2751] Inconsistent mtime and size are gotten when stat an opened file #1286

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

Originally created by @fangqianan on GitHub (Nov 11, 2025).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2751

Additional Information

s3fs-fuse is mountted with an option: stat_cache_expire=10.

I opened a file inside the mountpath with python, f=open("/mnt/mp/testdir/testfile", "rb"),and then stat this file and got size == 10, mtime == time_a.
After 10 seconds, I uploaded a new testdir/testfile with size 20 onto the bucket. Now I stat this file via s3fs-fuse, I get size == 10 (as expected), but mtime == time_b (the latest mtime).

I think maybe the mtime should also be filled with time_a to keep it consistent with size.

Details about issue

s3fs-fuse version: 1.95

Originally created by @fangqianan on GitHub (Nov 11, 2025). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2751 <!-- -------------------------------------------------------------------------- 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. --------------------------------------------------------------------------- --> ### Additional Information s3fs-fuse is mountted with an option: stat_cache_expire=10. I opened a file inside the mountpath with python, `f=open("/mnt/mp/testdir/testfile", "rb")`,and then stat this file and got size == 10, mtime == time_a. After 10 seconds, I uploaded a new testdir/testfile with size 20 onto the bucket. Now I stat this file via s3fs-fuse, I get size == 10 (as expected), but mtime == time_b (the latest mtime). I think maybe the mtime should also be filled with time_a to keep it consistent with size. ### Details about issue s3fs-fuse version: 1.95 <!-- Please describe the content of the issue in detail. -->
Author
Owner

@ggtakec commented on GitHub (Dec 7, 2025):

We have released version 1.96.
If possible, would it be possible for you to try that version?
Thanks in advance for your assistance.

<!-- gh-comment-id:3621654610 --> @ggtakec commented on GitHub (Dec 7, 2025): We have released version 1.96. If possible, would it be possible for you to try that version? Thanks in advance for your assistance.
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#1286
No description provided.