squid: mds/client: return -ENODATA when xattr doesn't exist for removexattr#58526
Merged
lxbsz merged 4 commits intoceph:squidfrom Jul 22, 2024
Merged
squid: mds/client: return -ENODATA when xattr doesn't exist for removexattr#58526lxbsz merged 4 commits intoceph:squidfrom
lxbsz merged 4 commits intoceph:squidfrom
Conversation
The POSIX says we should return -ENODATA when the corresponding attribute doesn't exist when removing it. While there is one exception for the acl ones in the local filesystems, for exmaple for xfs, which will treat it as success. While in the MDS side there have two ways to remove the xattr: sending a CEPH_MDS_OP_SETXATTR request by setting the 'flags' with CEPH_XATTR_REMOVE and just issued a CEPH_MDS_OP_RMXATTR request directly. For the first one it will always return 0 when the corresponding xattr doesn't exist, while for the later one it will return -ENODATA instead, this should be fixed in MDS to make them to be consistent. Added a CEPH_XATTR_REMOVE2 new flags and will return -ENODATA errno directly when the crresponding xattr doesn't exist. Just keeps the old CEPH_XATTR_REMOVE flags to make it to be compatible with old clients. Fixes: https://tracker.ceph.com/issues/64679 Signed-off-by: Xiubo Li <xiubli@redhat.com> (cherry picked from commit 797e926)
Switch to use XATTR_CREATE. Fixes: https://tracker.ceph.com/issues/64679 Signed-off-by: Xiubo Li <xiubli@redhat.com> (cherry picked from commit ec30c46)
There have two ways to remove xattrs, removexattr() and setxattr() with the XATTR_REPLACE flags set. Fixes: https://tracker.ceph.com/issues/64679 Signed-off-by: Xiubo Li <xiubli@redhat.com> (cherry picked from commit 1a27670)
Fixes: https://tracker.ceph.com/issues/64679 Signed-off-by: Xiubo Li <xiubli@redhat.com> (cherry picked from commit b2a07f8)
Member
Author
|
jenkins test api |
Member
Author
|
This PR is under test in https://tracker.ceph.com/issues/66906. |
lxbsz
approved these changes
Jul 22, 2024
Member
lxbsz
left a comment
There was a problem hiding this comment.
None of the failure is related to this backport PR:
More detail please see section 2024-07-17 in https://tracker.ceph.com/projects/cephfs/wiki/Squid.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport tracker: https://tracker.ceph.com/issues/66777
backport of #55945
parent tracker: https://tracker.ceph.com/issues/64679
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh