Skip to content

osdc/Objecter: pass the encoded attributes in ObjectOperation::setxat… - #72837

Open
MaxKellermann wants to merge 1 commit into
ceph:mainfrom
MaxKellermann:osdc_Objecter__setxattrs_data
Open

MaxKellermann wants to merge 1 commit into
ceph:mainfrom
MaxKellermann:osdc_Objecter__setxattrs_data

Conversation

@MaxKellermann

Copy link
Copy Markdown
Member

…trs()

setxattrs() encoded the attribute map into bl, but then passed bl.length() instead of bl to add_xattr(), which was implicitly converted to an empty buffer::list via its list(unsigned prealloc) constructor, so the attributes were never sent.

This regression was caused 17 years ago by commit 7a624a4 ("osd: hold op data on the specific op") which removed the "valuelen" overload of add_xattr(). Nobody ever noticed that bug because this is dead code.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

…trs()

setxattrs() encoded the attribute map into `bl`, but then passed
`bl.length()` instead of `bl` to add_xattr(), which was implicitly
converted to an empty buffer::list via its `list(unsigned prealloc)`
constructor, so the attributes were never sent.

This regression was caused 17 years ago by commit 7a624a4 ("osd:
hold op data on the specific op") which removed the "valuelen"
overload of add_xattr().  Nobody ever noticed that bug because this is
dead code.

Signed-off-by: Max Kellermann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant