-
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
A bit more import cleanup work #1193
Conversation
Conceptually `ostree-repo-pull.c` should be be written using just public APIs; we theoretically support building without HTTP for people who just want to use the object store portion and do their own fetching. We have some nontrivial behaviors in the pull layer though; one of those is the "bareuseronly" verification. Make a new internal API that accepts flags, move it into `commit.c`. This is prep for further work in changing object import to support reflinks.
While opening a repo we've recorded the device/inode for a while; use it to avoid calling `linkat()` during object import if we know it's going to fail.
cd262a6
to
c9454f2
Compare
bot, retest this please |
src/libostree/ostree-repo-commit.c
Outdated
GCancellable *cancellable, | ||
GError **error) | ||
{ | ||
const gboolean trusted = (flags & _OSTREE_REPO_IMPORT_FLAGS_VERIFY_CHECKSUM) == 0; |
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.
Might as well make the flag _OSTREE_REPO_IMPORT_FLAGS_TRUSTED
. Seems safer to just assume it's untrusted and require the flag to be explicitly set.
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.
Good suggestion, fixup ⬇️
return glnx_throw_errno_prefix (error, "linkat"); | ||
} | ||
|
||
if (objtype == OSTREE_OBJECT_TYPE_COMMIT) |
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.
Can't we just hardlink detached metadata too if we succesfully hardlinked the commit?
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.
Yeah...we weren't doing that before though, can make that a separate commit?
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.
Yup, sure!
While opening a repo we've recorded the device/inode for a while; use it to avoid calling `linkat()` during object import if we know it's going to fail. Closes: #1193 Approved by: jlebon
☀️ Test successful - status-atomicjenkins |
No description provided.