mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[GH-ISSUE #2126] Test for object names exceeding NAME_MAX #1085
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#1085
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?
Originally created by @ggtakec on GitHub (Mar 11, 2023).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2126
Additional Information
Version of s3fs being used (
s3fs --version)v1.91(current master branch)
Details about issue
Derived from this issue as pointed out by #2123.
Object names exceeding NAME_MAX should be tested to confirm behavior.
You should consider the consequences of that action and make corrections if necessary.
@ggtakec commented on GitHub (Mar 11, 2023):
I ran a very simple test.
I tested it by specifying a file name longer than
NAME_MAX(=255 on my host) (260 here) inTEST_TEXT_FILEoftest-utils.sh.If set 260 file name length, the operation was stable without any particular errors.
I'll try it later with a longer file name.
@ggtakec commented on GitHub (Mar 11, 2023):
The test seems to pass even if I name the file over 4096(4100).
@gaul
If there's anything else I should test, please let me know.
@gaul commented on GitHub (May 30, 2023):
There are two behaviors we could test:
NAME_MAX+ 1 length name, should fail withENAMETOOLONGbefore s3fs sees itNAME_MAX + 1length name. I don't know what s3fs does here but I don't believe that FUSE will allowopento open this orreaddirto list it. My concern is that s3fs will truncate this toNAME_MAXwhen instead it should skip it and log a warning message.@ggtakec commented on GitHub (Jun 4, 2023):
@gaul I re-confirmed file names exceeding NAME_MAX(255).
As that result, it is different depending on whether the cache directory is used or not.
list(
lscommand)File names exceeding NAME_MAX(255) can be displayed without problems.(no error)
read(
catcommand)The results differ depending on whether or not the cache directory (
use_cacheoption) is used.If the cache is not used, reading the file succeeds.
When using a cache, an error occurs when creating a cache file(under the cache directory),
ENAMETOOLONGis received, and anEIOerror occurs.write(
touchcommand)Without caching, writing the file succeeds.
An
ENOENTerror occurs when using the cache.(TheENOENTerror that occurred during processing is returned.)These seem to only occur when the s3fs process needs to operate on local disks with file names that exceed NAME_MAX.
@gaul commented on GitHub (Sep 8, 2023):
Addressed by
9fb4c32c6a. There are some issues when using the cache but this is due to the underlying filesystem limitation.