mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #1964] [MERGED] Added stat information to the mount point #2274
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#2274
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/1964
Author: @ggtakec
Created: 6/20/2022
Status: ✅ Merged
Merged: 10/22/2022
Merged by: @ggtakec
Base:
master← Head:fix_root_stat📝 Commits (1)
c76b8c5Added stat information to the mount point📊 Changes
2 files changed (+263 additions, -90 deletions)
View changed files
📝
src/s3fs.cpp(+178 -90)📝
test/integration-test-main.sh(+85 -0)📄 Description
Relevant Issue (if applicable)
#1961 #1962
Details
NOTE: This fix is a preliminary fix needed to resolve #1961 and #1962.
This PR allows user to retain the mount point's stat information.
Background
The mount point that s3fs mounts does not have stat information.
Therefore, the situation is as follows now:
The mount point is unixtime(0) for
mtime/ctime/atime, and in0777as mode, and theuser/groupis as same as s3fs process'suid/gid.These can be changed with the
mp_umaskoption, but it does not retain stat information.Changes
The mount point can be the root of the bucket or a directory under the bucket.
In the case of bucket root, a file(directory object) for stat information is created and stored in the bucket root.
Its path is
/and the directory object is also/.This matches usually the directory object(
<directory name>/) that s3fs is currently creating for the directory. (/means that the directory name is empty.)In this case, the directory object will be
/.If the directory is under a bucket(ex.
foo), the stat information will be used the stat information for that directory.That is, it uses the information in the directory object(
foo/).By handling the stat information of the mount point, it has been modified so that operations such as
chmod/chown/utimensetc commands can be performed.When an operation is performed on the mount point via the s3fs process with this modification, the directory object is output/updated and the stat information is saved.
Notes
Once this PR is merged, I can post another PR which resolves for #1961 and #1962 issues.
Also, I think we can abolish(or deprecate) the
mp_umaskoption.If users allow it, I'll create a PR to abolish them later.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.