Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow file overwrites #487

Merged
merged 3 commits into from
Jan 16, 2024
Merged

Allow file overwrites #487

merged 3 commits into from
Jan 16, 2024

Conversation

monthonk
Copy link
Contributor

@monthonk monthonk commented Aug 29, 2023

Description of change

Allow file overwrites on mountpoint. This is quite straightforward for files opened with O_WRONLY, we can just return a new write handle instead of InodeNotWritable error when the write status is remote. However, it's a bit tricky for files opened with O_RDWR because we can either read or write to remote files and it means we can't decide that at open() time. So, I changed the concept of file handle to be able to do both write and read based on the operation that comes after open().

Same as "delete", I disable this feature by default and provide a new option --allow-overwrite to enable it.

Does this change impact existing behavior?

Yes, mountpoint now supports overwrites when mounting with --allow-overwrite option.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

@monthonk monthonk temporarily deployed to PR integration tests August 29, 2023 12:48 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests August 29, 2023 12:48 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests August 29, 2023 12:48 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests August 29, 2023 12:48 — with GitHub Actions Inactive
@monthonk monthonk changed the title Overwrite Allow file overwrites Aug 29, 2023
Copy link
Member

@jamesbornholt jamesbornholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks like this was a fairly simple change. A couple of high level questions for now.

mountpoint-s3/src/fs.rs Outdated Show resolved Hide resolved
mountpoint-s3/src/fs.rs Outdated Show resolved Hide resolved
mountpoint-s3/src/fs.rs Outdated Show resolved Hide resolved
mountpoint-s3/tests/fuse_tests/write_test.rs Outdated Show resolved Hide resolved
mountpoint-s3/tests/fuse_tests/write_test.rs Outdated Show resolved Hide resolved
mountpoint-s3/src/inode.rs Outdated Show resolved Hide resolved
@monthonk monthonk temporarily deployed to PR integration tests September 4, 2023 15:46 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests September 4, 2023 15:46 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests September 4, 2023 15:46 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests September 4, 2023 15:46 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests September 4, 2023 16:10 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests September 4, 2023 16:10 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests September 4, 2023 16:10 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests September 4, 2023 16:10 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests September 7, 2023 15:49 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests September 7, 2023 15:49 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests September 7, 2023 15:49 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests September 9, 2023 20:40 — with GitHub Actions Inactive
Signed-off-by: Monthon Klongklaew <monthonk@amazon.com>
Signed-off-by: Monthon Klongklaew <monthonk@amazon.com>
Signed-off-by: Monthon Klongklaew <monthonk@amazon.com>
@monthonk monthonk temporarily deployed to PR integration tests January 15, 2024 16:04 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests January 15, 2024 16:04 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests January 15, 2024 16:04 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests January 15, 2024 16:04 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests January 15, 2024 16:04 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests January 15, 2024 19:57 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests January 15, 2024 19:57 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests January 15, 2024 19:57 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests January 15, 2024 19:57 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests January 15, 2024 19:57 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests January 15, 2024 19:57 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests January 15, 2024 19:57 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance PRs to run benchmarks on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants