Repository navigation
fix: carry xattrs in local batches and drop unreadable-xattr entries - #8288
Merged
Merged
Conversation
oferchen
force-pushed
the
fix/local-batch-acls
branch
from
November 3, 2026 06:40
e60638d to
aa6d2f8
Compare
oferchen
force-pushed
the
fix/acl-xattr-read-errors
branch
from
November 3, 2026 07:16
f99305f to
df53dc9
Compare
oferchen
force-pushed
the
fix/acl-xattr-read-errors
branch
from
November 3, 2026 19:42
df53dc9 to
2c3bb6f
Compare
This was referenced Nov 4, 2026
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.
Stacked on #8281. Retarget to master once that merges.
Summary
--write-batch -Xnow records xattrs the way 3.5.1 does. The batch is a tee of the sender's stream (io.c:2747start_write_batch). Each entry's xattrs go in the file list. A value longer thanMAX_FULL_DATUM(32 bytes) is stored there as a digest, and its full value follows the entry's iflags underITEM_REPORT_XATTR(sender.c:482-484,xattrs.c:651-703send_xattr_request). The value is marked to send when the destination lacks that name and datum (generator.c:571-582,xattr_diff). Before this change, local batches carried no xattrs.--read-batchnow applies those full values, on transfer rows and on metadata-only rows such as directories (xattrs.c:779-794recv_xattr_request). Before this change, oc dropped long values even from batches 3.5.1 recorded.-Dkeeps them, matchingxattrs.c:322-345get_xattr. The rule lives in one place,protocol::xattr::entry_carries_xattrs, used by the generator and the batch writer.IOERR_GENERAL, so the run exits 23 likeflist.c:2050-2087send_file_name. An ENOTSUP list means no names. Any other error prints upstream's text:get_xattr_names: llistxattr(<path>,1024) failedorget_xattr_data: lgetxattr(<path>,"<name>",0) failed.get_rsync_aclnow points at the follow-up that moves the read into the create-and-send step (task 519).Tests
tests/batch_upstream_oracle.rslocal_batch_carries_xattrs_like_upstream:-rXand-rX --no-inc-recursive, with short and long values on files, nested files and a directory. oc and 3.5.1 each record a batch, both replay each one, and every result is compared to the source withgetfattr. Gated on the xattr capability,setfattrandgetfattr.tests/sender_xattr_read_failure.rs(Linux, non-root): a mode-000 file has an xattr, so its value read fails with EACCES. oc and 3.5.1 clients pull it from an oc server. Expected: exit 23, theget_xattr_dataline, the file dropped, its sibling copied.protocol::xattr::scope::each_entry_type_follows_its_own_preserve_option.--checksum-seed=1, oc's batch carrying long values is byte-identical to 3.5.1's in INC and no-inc modes, except the final stats trailer, which differs without-Xtoo.Known limits
ITEM_REPORT_XATTRrow before its generator makes the directory, and failsstat ... failed(exit 23). The test replays directory-xattr batches through oc only.src/./bwhere upstream namessrc/b(tasks 99/100).get_xattr_data's message but are not exercised end to end.