Skip to content

squid: mds/client: return -ENODATA when xattr doesn't exist for removexattr - #58526

Merged
xiubli merged 4 commits into
ceph:squidfrom
joscollin:wip-66777-squid
Jul 22, 2024
Merged

xiubli merged 4 commits into
ceph:squidfrom
joscollin:wip-66777-squid

Conversation

@joscollin

Copy link
Copy Markdown
Member

xiubli added 4 commits July 11, 2024 07:01
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 <[email protected]>
(cherry picked from commit 797e926)
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 <[email protected]>
(cherry picked from commit 1a27670)
@joscollin joscollin added this to the squid milestone Jul 11, 2024
@joscollin joscollin added the cephfs Ceph File System label Jul 11, 2024
@joscollin

Copy link
Copy Markdown
Member Author

jenkins test api

@joscollin joscollin added In Progress PR in progress and not yet ready for review. and removed In Progress PR in progress and not yet ready for review. labels Jul 11, 2024
@joscollin
joscollin requested a review from a team July 11, 2024 05:44
@joscollin

Copy link
Copy Markdown
Member Author

@xiubli xiubli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@xiubli
xiubli merged commit 0722069 into ceph:squid Jul 22, 2024
@joscollin
joscollin deleted the wip-66777-squid branch July 23, 2024 03:29
afreen23 pushed a commit to rhcs-dashboard/ceph that referenced this pull request Jul 29, 2026
squid: mds/client: return -ENODATA when xattr doesn't exist for removexattr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants