mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-16 10:50:43 +03:00
Merge pull request #2689 from jlebon/pr/ficlone-direct-payload
lib/commit: Directly use FICLONE for payload link
This commit is contained in:
commit
9995f370d3
@ -881,11 +881,8 @@ _try_clone_from_payload_link (OstreeRepo *self,
|
||||
else
|
||||
{
|
||||
/* This undoes all of the previous writes; we want to generate reflinked data. */
|
||||
if (ftruncate (tmpf->fd, 0) < 0)
|
||||
return glnx_throw_errno_prefix (error, "ftruncate");
|
||||
|
||||
if (glnx_regfile_copy_bytes (fdf, tmpf->fd, -1) < 0)
|
||||
return glnx_throw_errno_prefix (error, "regfile copy");
|
||||
if (ioctl (tmpf->fd, FICLONE, fdf) < 0)
|
||||
return glnx_throw_errno_prefix (error, "FICLONE");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -100,8 +100,7 @@ EOF
|
||||
newcommit=$(ostree rev-parse staged-deploy)
|
||||
ostree admin upgrade --stage >out.txt
|
||||
test -f /run/ostree/staged-deployment
|
||||
# Debating bouncing back out to Ansible for this
|
||||
firstdeploycommit=$(rpm-ostree status |grep 'Commit:' |head -1|sed -e 's,^ *Commit: *,,')
|
||||
firstdeploycommit=$(rpm-ostree status --json | jq -r .deployments[0].checksum)
|
||||
assert_streq "${firstdeploycommit}" "${newcommit}"
|
||||
# Cleanup
|
||||
rpm-ostree cleanup -rp
|
||||
|
Loading…
x
Reference in New Issue
Block a user