Repository navigation
librgw: Persist extended attributes across all writes for object - #73048
vagnihotri-dev wants to merge 2 commits into
Conversation
|
Thank you for your contribution. Since you are not yet a member of the Ceph organization with write permissions on ceph/ceph.git, our CI will not automatically run. Any member of the Ceph organization may label this PR |
c458701 to
69ac585
Compare
mattbenjamin
left a comment
There was a problem hiding this comment.
I think I support this provisionally, but I think it's essentially operating in a semantically ill-defined space in the current model. However, because preserving xattrs into new versions of an object will be in the forthcoming open2 model, it's probably better than what we do today, for most usages.
|
I can confirm that the issue where the Windows SMB client loses critical metadata stored in extended attributes after a modify operation is no longer observed in a build that includes the proposed changes. |
|
Recently I realized that the new @vagnihotri-dev Could xattr changes made during an active write be queued and applied when the write finishes, instead of returning |
I am trying to work out something like, to allow set/rm attribute operations to update cache instead f returning EBUSY. |
69ac585 to
d3288a8
Compare
d3288a8 to
4b6d70f
Compare
Thanks for working on this. I verified that the new approach allows clients to modify xattrs through existing open handles. If I understand correctly, the associated test case still doesn't cover this scenario. Could you update it to keep the handle open while modifying the xattrs? |
Yes, I'd update test case. |
4b6d70f to
74bef08
Compare
7e264cc to
500fb51
Compare
Current write implementation perserves metadata attributes across write operation, however it does not merge extended attributes. Therefore write operation on same object wipes out these attributes. As a fix, Fix this by reading the object's RGW_ATTR_META_PREFIX* attributes just before the write is committed and re-applying them in exec_finish. The exclusive lock is taken only when a write transaction is being committed, never while data is being written, so xattr calls are not delayed by an open file that is still receiving data. Fixes: https://tracker.ceph.com/issues/82020 Signed-off-by: Vinit Agnihotri <[email protected]>
This test case verifies persistence of extended attributes in case of modify operation on object. Flow: 1. create object via rgw_create, write 10 bytes. 2. set user.TEST_ATTR on the object. 3. list xattrs – assert user.TEST_ATTR is present and close. 4. open and overwrite object with 20 bytes, close. 5. list xattrs – PASS if user.TEST_ATTR still present, FAIL if lost 6. release handle, unlink object Fixes: https://tracker.ceph.com/issues/82020 Signed-off-by: Vinit Agnihotri <[email protected]>
500fb51 to
a25468d
Compare
anoopcs9
left a comment
There was a problem hiding this comment.
Thanks, I'll defer the core review to @mattbenjamin.
|
This PR has been added to wip-anrao6-testing-2026-11-13-0833-main. |
|
This PR has been removed from wip-anrao6-testing-2026-11-13-1158-main. |
|
This PR has been added to wip-anrao1-testing-2026-11-26-0609-main. |
Current rgw_write() implementation does not preserve extended attributes across writes for object,
therefore, if object is modifying all of its extended attributes are lost.
This PR proposes a fix, by storing attributes in beginning of write and then puts them back on write finish,
additionally, it also ensures attribute consistency by preventing access to set remove attribute till write is finished.
Fixes: https://tracker.ceph.com/issues/82020
Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.