Skip to content

Commit

Permalink
Merge pull request #1691 from vrothberg/fix-podman-19467
Browse files Browse the repository at this point in the history
overlay: Diffsize: naive diff when not parent
  • Loading branch information
giuseppe committed Aug 23, 2023
2 parents 3add991 + 9dc0dc5 commit 6902c2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contrib/cirrus/build_and_test.sh
Expand Up @@ -71,7 +71,10 @@ case $TEST_DRIVER in
zfs create $zpool/tmp
TMPDIR="/$zpool/tmp" showrun make STORAGE_DRIVER=$TEST_DRIVER local-test-integration local-test-unit
# Ensure no datasets are held open prior to `zfs destroy` trap.
kill $(lsns -J -t mnt --output-all | jq '.namespaces[]|select(.command=="sleep 1000s").pid')
datasets=$(lsns -J -t mnt --output-all | jq '.namespaces[]|select(.command=="sleep 1000s").pid')
if [[ -n "$datasets" ]]; then
kill $datasets
fi
;;
*)
die "Unknown/Unsupported \$TEST_DRIVER=$TEST_DRIVER (see .cirrus.yml and $(basename $0))"
Expand Down
4 changes: 4 additions & 0 deletions drivers/overlay/overlay.go
Expand Up @@ -2170,6 +2170,10 @@ func (d *Driver) getLowerDiffPaths(id string) ([]string, error) {
// and its parent and returns the size in bytes of the changes
// relative to its base filesystem directory.
func (d *Driver) DiffSize(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) (size int64, err error) {
if !d.isParent(id, parent) {
return d.naiveDiff.DiffSize(id, idMappings, parent, parentMappings, mountLabel)
}

p, err := d.getDiffPath(id)
if err != nil {
return 0, err
Expand Down

0 comments on commit 6902c2d

Please sign in to comment.