[GH-ISSUE #1038] open, remove, write to an fd fails #569

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

Originally created by @gaul on GitHub (Jun 13, 2019).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1038

The following test fails against master:

function test_open_remove_write {
    describe "Write to an open but removed file"
    (   
        rm -f ${TEST_TEXT_FILE}
        echo foo
    ) > ${TEST_TEXT_FILE}
}

With the error:

s3fs: [ERR] s3fs.cpp:s3fs_write(2236): could not find opened fd(/testrun-8OC858/.fuse_hidden0000000300000001)
Originally created by @gaul on GitHub (Jun 13, 2019). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1038 The following test fails against master: ```bash function test_open_remove_write { describe "Write to an open but removed file" ( rm -f ${TEST_TEXT_FILE} echo foo ) > ${TEST_TEXT_FILE} } ``` With the error: ``` s3fs: [ERR] s3fs.cpp:s3fs_write(2236): could not find opened fd(/testrun-8OC858/.fuse_hidden0000000300000001) ```
Author
Owner

@gaul commented on GitHub (Oct 10, 2020):

This seems like a corner case that is unlikely to improve much. Since s3fs does not support hard links, the best that we could do is allow reading and writing to the removed file, I guess like a temporary file, then remove it on close.

<!-- gh-comment-id:706568370 --> @gaul commented on GitHub (Oct 10, 2020): This seems like a corner case that is unlikely to improve much. Since s3fs does not support hard links, the best that we could do is allow reading and writing to the removed file, I guess like a temporary file, then remove it on close.
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#569
No description provided.