-
Notifications
You must be signed in to change notification settings - Fork 305
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
checkout: Support a "pure addition" mode #714
Conversation
WIP due to lack of tests, cmdline wrapper. |
WIP due to missing tests and docs. But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
WIP due to missing tests and docs. But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
WIP due to missing tests and docs. But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
Now with tests ✅ - removing WIP. |
src/libostree/ostree-repo-checkout.c
Outdated
{ | ||
/* In this mode, we keep existing content. Still need to mark the hardlink as supported. | ||
*/ | ||
ret_was_supported = TRUE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One concern with this is that the kernel checks for EEXISTS
before checking whether hardlinking is supported. So we can't really assert this, right? Looking at checkout_one_file_at()
, it relies on this info to update the devino cache, which will be wrong after this. Maybe add e.g. out_exists
also so callers can distinguish this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooh. That's a good catch. That would have been spectacularly painful to debug later.
Ok, rebased 🏄, added a prep patch and a fixup. |
src/libostree/ostree-repo-checkout.c
Outdated
cancellable, error)) | ||
{ | ||
g_prefix_error (error, "Using new cached uncompressed hardlink of %s to %s: ", checksum, destination_name); | ||
goto out; | ||
} | ||
|
||
need_copy = !did_hardlink; | ||
need_copy = hardlink_res == HARDLINK_RESULT_NOT_SUPPORTED; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parentheses on these, please!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done ⬇️
Nice! Looks like some tests might need to be adjusted to grep for the new error message. |
At least in all Linux kernels up to today, one can never `link()` across devices, so we might as well verify that up front. This will help for a future patch to add a new type of union-add checkout, since Linux checks for `EEXIST` before `EXDEV`.
I plan to use this for `rpm-ostree livefs`. coreos/rpm-ostree#639
Eh, my fixups went wrong, I just squashed to simplify. One of the bugs was we need to initialize |
I plan to use this for `rpm-ostree livefs`. coreos/rpm-ostree#639 Closes: #714 Approved by: jlebon
☀️ Test successful - status-atomicjenkins |
WIP due to missing tests and docs. But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
WIP due to missing tests and docs. But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
WIP due to missing tests and docs. But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
But I've been playing with this interactively, and it's at a useful place already. The primary target here is supporting live addition of new packages, while *also* allowing people to do completely arbitrary replacement if that's what they want. Depends: GNOME/libglnx#36 ostreedev/ostree#714 Closes: coreos#639
I plan to use this for
rpm-ostree livefs
.coreos/rpm-ostree#639