[PR #2687] [MERGED] Fixed bugs in removing xattrs func and and test for it #2711

Closed
opened 2026-03-04 02:06:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2687
Author: @ggtakec
Created: 6/10/2025
Status: Merged
Merged: 6/26/2025
Merged by: @gaul

Base: masterHead: fix/xattr_delete


📝 Commits (1)

  • 681d9e9 Fixed bugs in removing xattrs func and and test for it

📊 Changes

4 files changed (+106 additions, -22 deletions)

View changed files

📝 src/cache.cpp (+15 -8)
📝 src/s3fs.cpp (+25 -2)
📝 test/integration-test-main.sh (+54 -12)
📝 test/test-utils.sh (+12 -0)

📄 Description

Relevant Issue (if applicable)

n/a

Details

I found a bug in the xattrs deletion function.

When xattrs are deleted and no keys remain, the xattr header itself should also be deleted, but this was not possible when the file was not open, etc. (so this is a bug.)

I also discovered several flaws in test_update_metadata_external_large_object and test_update_metadata_external_small_object, which test xattrs.
One is that the test file names for adding and deleting xattrs are the same.
The other is that the reading of xattrs was not checked after it was added or deleted.

I fixed these, and the frequent failures of the above tests, especially on macos, were fixed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/2687 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 6/10/2025 **Status:** ✅ Merged **Merged:** 6/26/2025 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `fix/xattr_delete` --- ### 📝 Commits (1) - [`681d9e9`](https://github.com/s3fs-fuse/s3fs-fuse/commit/681d9e9670ad801ffdc92385edf69afe3f712c2c) Fixed bugs in removing xattrs func and and test for it ### 📊 Changes **4 files changed** (+106 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `src/cache.cpp` (+15 -8) 📝 `src/s3fs.cpp` (+25 -2) 📝 `test/integration-test-main.sh` (+54 -12) 📝 `test/test-utils.sh` (+12 -0) </details> ### 📄 Description ### Relevant Issue (if applicable) n/a ### Details I found a bug in the `xattrs` deletion function. When `xattrs` are deleted and no keys remain, the `xattr` header itself should also be deleted, but this was not possible when the file was not open, etc. _(so this is a bug.)_ I also discovered several flaws in `test_update_metadata_external_large_object` and `test_update_metadata_external_small_object`, which test `xattrs`. One is that the test file names for adding and deleting `xattrs` are the same. The other is that the reading of `xattrs` was not checked after it was added or deleted. I fixed these, and the frequent failures of the above tests, especially on macos, were `fixed`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:06:55 +03:00
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#2711
No description provided.