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.
mkcomposefs: Drop duplicate invocation of lcfs_node_set_mode()
Just noticed this while I was reading the code for other reasons.
Signed-off-by: Colin Walters walters@verbum.org
Add fallible lcfs_node_try_set_mode()
Previously I added code to validate this but it happened much
later. The mode (type) of a file is a very fundamental property
and we should constrain its state as early as possible.
Signed-off-by: Colin Walters walters@verbum.org
Add lcfs_node_set_symlink_payload
Historically we accept any arbitrary data in the dumpfile
for the file size for symlink, and end up ignoring it
ultimately when we write the EROFS. However previously
it was pretty confusing as the in-memory node data
could have a bogus size.
Add an API and use it both in the mkcomposefs path and
in the "reread from EROFS path" to perform more consistent
validation for symlink targets. This just wraps the
previous
lcfs_node_set_payload()
API, inheriting itschecks for length.
Signed-off-by: Colin Walters walters@verbum.org