Skip to content

s3: support x-amz-meta-mode for symlinks (s3fs-fuse interop)#130

Open
mkviatkovskii wants to merge 1 commit into
XTXMarkets:mainfrom
mkviatkovskii:main
Open

s3: support x-amz-meta-mode for symlinks (s3fs-fuse interop)#130
mkviatkovskii wants to merge 1 commit into
XTXMarkets:mainfrom
mkviatkovskii:main

Conversation

@mkviatkovskii
Copy link
Copy Markdown

Goal

Make the s3 gateway compatible with s3fs-fuse's symlink convention. Without this, mounting a TernFS bucket via s3fs flattens every ln -s into a regular file containing the target path as data.

Changes

  • On PUT, read x-amz-meta-mode. If S_IFLNK is set, create a msgs.SYMLINK inode (TernFS already stores symlink targets as the inode's body — same as ternfuse).
  • On GET / HEAD / ?attributes, emit x-amz-meta-mode so s3fs reconstructs the symlink on read.
  • Header is parsed base-0 to match s3fs's strtoll(_, _, 0) (decimal, octal, hex all accepted). Missing/garbage = regular file.
  • Unit tests in go/s3/s3_test.go for the parser/emitter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant