-
Notifications
You must be signed in to change notification settings - Fork 402
feature: copy or reflink cpio data directly from source instead of staging in tmpdir #1662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
As reference, Linux's
dracut currently supports file paths with spaces and newlines, so I think we'll need to instead use a manifest format which allows for this (e.g. '\0' separators). One other manifest addition I'd like to add is something like:
Where the |
Makes sense. |
My rough task breakdown for this ticket is:
This will take some time, but I'll try to post an RFC branch once I have something worthy of early feedback. Others are welcome to join the party ;-) (possibly in future, depending on benchmarks, feedback, rust availability, etc.)
@mwilck given your helpful scrutiny of the |
It looks as if dracut-cpio would grow towards being an almost feature-complete cpio replacement. Perhaps you should create a separate project for it rather than hiding it here in dracut?
I wouldn't call what I did previously a "scrutiny" 😉 I wouldn't even think about scrutinizing it, as my rust knowledge is close to zero. I experimented with your code, and had pleasant results and no issues, that much I can say. |
...
It's still only for archive creation, so I think it's fine to stay where it is for the moment. Besides, having it embedded allows for the source-path-is-dest-path -> manifest conversion without needing to deal with ugly version dependencies, etc.
Okay, no worries - thanks for the feedback! |
When generating initramfs images, dracut currently recreates the filesystem tree in a staging area under
tmpdir
. This is mostly needed due to GNU cpio's unfortunate source-path-is-dest-path behaviour.As of #1531 dracut now has it's own (optional) cpio archiver
dracut-cpio
.dracut-cpio
currently replicates the GNU cpio source-path-is-dest-path behaviour, but it could be modified to process a content manifest similar to the kernel'sgen_init_cpio
utility, which uses separate source and destination file paths.Eliminating
tmpdir
staging for cpio data should provide a not-insignificant performance boost for both reflinked (viacopy_file_range
) and non-reflinked cpio archives.The text was updated successfully, but these errors were encountered: