Skip to content

Fix RR CE chaining - #178

Merged
clalancette merged 3 commits into
masterfrom
clalancette/fix-rr-ce-chaining
Aug 10, 2026
Merged

Fix RR CE chaining#178
clalancette merged 3 commits into
masterfrom
clalancette/fix-rr-ce-chaining

Conversation

@clalancette

Copy link
Copy Markdown
Owner

Issue #177 pointed out that trying to write out an ISO with more than one RR CE records failed because the RockRidge.add_entry() method didn't live up to its documented contract of returning None when it couldn't find room in the RR CE entry. Fix this by changing that method to return None as appropriate.

While we were looking at this, we also noticed that RR CE "chaining" didn't really work for reading or writing either. That is, RR CE blocks can be arbitrarily chained, one to the next, to handle very long entries. But we didn't support reading or writing those entries, so they would also fail. Fix this so we are more robust to this type of thing. In reality, this amount of chaining is rare, and is practically limited by the length of filesystem entries (typically PATH_MAX). Nonetheless, we should support them as well as we can.

Fixes #177

If an RR CE entry wouldn't fit, add_entry() would detect
it and return an error.  Unfortunately, that was documented
as None but it actually returned -1.  Fix this, and add
tests to prove it.

While we are in here, also fix a related bug where failing
to add an RR CE entry after we have already failed to fit
would silently corrupt data.  We now throw an exception.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Chained CE areas are supported by the standard and the
linux isofs driver, so make sure we can also parse them.
Right now we cannot right them, so the tests make one
out of whole cloth rather than using our write().

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
This is the last bit of full RR CE handling; the ability
to write out e.g. symlinks that are too long for one CE
area.  Implement this along with tests.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
@clalancette
clalancette merged commit d284139 into master Aug 10, 2026
5 checks passed
@clalancette
clalancette deleted the clalancette/fix-rr-ce-chaining branch August 10, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant