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
|
else
|
||||||
{
|
{
|
||||||
/* This undoes all of the previous writes; we want to generate reflinked data. */
|
/* This undoes all of the previous writes; we want to generate reflinked data. */
|
||||||
if (ftruncate (tmpf->fd, 0) < 0)
|
if (ioctl (tmpf->fd, FICLONE, fdf) < 0)
|
||||||
return glnx_throw_errno_prefix (error, "ftruncate");
|
return glnx_throw_errno_prefix (error, "FICLONE");
|
||||||
|
|
||||||
if (glnx_regfile_copy_bytes (fdf, tmpf->fd, -1) < 0)
|
|
||||||
return glnx_throw_errno_prefix (error, "regfile copy");
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,8 +100,7 @@ EOF
|
||||||
newcommit=$(ostree rev-parse staged-deploy)
|
newcommit=$(ostree rev-parse staged-deploy)
|
||||||
ostree admin upgrade --stage >out.txt
|
ostree admin upgrade --stage >out.txt
|
||||||
test -f /run/ostree/staged-deployment
|
test -f /run/ostree/staged-deployment
|
||||||
# Debating bouncing back out to Ansible for this
|
firstdeploycommit=$(rpm-ostree status --json | jq -r .deployments[0].checksum)
|
||||||
firstdeploycommit=$(rpm-ostree status |grep 'Commit:' |head -1|sed -e 's,^ *Commit: *,,')
|
|
||||||
assert_streq "${firstdeploycommit}" "${newcommit}"
|
assert_streq "${firstdeploycommit}" "${newcommit}"
|
||||||
# Cleanup
|
# Cleanup
|
||||||
rpm-ostree cleanup -rp
|
rpm-ostree cleanup -rp
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue