Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

cgwalters
Copy link
Member

No description provided.

@cgwalters cgwalters mentioned this pull request Sep 20, 2017
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.
@cgwalters
Copy link
Member Author

bot, retest this please

GCancellable *cancellable,
GError **error)
{
const gboolean trusted = (flags & _OSTREE_REPO_IMPORT_FLAGS_VERIFY_CHECKSUM) == 0;
Copy link
Member

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.

Copy link
Member Author

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)
Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, sure!

@jlebon
Copy link
Member

jlebon commented Sep 21, 2017

@rh-atomic-bot r+ b9b3abd

@rh-atomic-bot
Copy link

⌛ Testing commit b9b3abd with merge d75316c...

rh-atomic-bot pushed a commit that referenced this pull request Sep 21, 2017
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
@rh-atomic-bot
Copy link

☀️ Test successful - status-atomicjenkins
Approved by: jlebon
Pushing d75316c to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants