Skip to content

Commit

Permalink
lxd/storage/drivers/zfs: Pass the CopyVolume struct to genericVFSCopy…
Browse files Browse the repository at this point in the history
…Volume

Signed-off-by: Julian Pelizäus <[email protected]>
  • Loading branch information
roosterfish committed Feb 16, 2024
1 parent ce86f35 commit eca015a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lxd/storage/drivers/driver_zfs_volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,7 @@ func (d *zfs) RefreshVolume(vol VolumeCopy, srcVol VolumeCopy, refreshSnapshots
// refresh instead.
if errors.Is(err, ErrSnapshotDoesNotMatchIncrementalSource) {
d.logger.Debug("Unable to perform an optimized refresh, doing a generic refresh", logger.Ctx{"err": err})
return genericVFSCopyVolume(d, nil, vol.Volume, srcVol.Volume, refreshSnapshots, true, allowInconsistent, op)
return genericVFSCopyVolume(d, nil, vol, srcVol, refreshSnapshots, true, allowInconsistent, op)
}

return fmt.Errorf("Failed to transfer snapshot %q: %w", snap.name, err)
Expand All @@ -1355,7 +1355,7 @@ func (d *zfs) RefreshVolume(vol VolumeCopy, srcVol VolumeCopy, refreshSnapshots
// refresh instead.
if errors.Is(err, ErrSnapshotDoesNotMatchIncrementalSource) {
d.logger.Debug("Unable to perform an optimized refresh, doing a generic refresh", logger.Ctx{"err": err})
return genericVFSCopyVolume(d, nil, vol.Volume, srcVol.Volume, refreshSnapshots, true, allowInconsistent, op)
return genericVFSCopyVolume(d, nil, vol, srcVol, refreshSnapshots, true, allowInconsistent, op)
}

return fmt.Errorf("Failed to transfer snapshot %q: %w", snap.name, err)
Expand Down Expand Up @@ -1384,7 +1384,7 @@ func (d *zfs) RefreshVolume(vol VolumeCopy, srcVol VolumeCopy, refreshSnapshots
// refresh instead.
if errors.Is(err, ErrSnapshotDoesNotMatchIncrementalSource) {
d.logger.Debug("Unable to perform an optimized refresh, doing a generic refresh", logger.Ctx{"err": err})
return genericVFSCopyVolume(d, nil, vol.Volume, srcVol.Volume, refreshSnapshots, true, allowInconsistent, op)
return genericVFSCopyVolume(d, nil, vol, srcVol, refreshSnapshots, true, allowInconsistent, op)
}

return fmt.Errorf("Failed to transfer main volume: %w", err)
Expand All @@ -1401,7 +1401,7 @@ func (d *zfs) RefreshVolume(vol VolumeCopy, srcVol VolumeCopy, refreshSnapshots
// refresh instead.
if errors.Is(err, ErrSnapshotDoesNotMatchIncrementalSource) {
d.logger.Debug("Unable to perform an optimized refresh, doing a generic refresh", logger.Ctx{"err": err})
return genericVFSCopyVolume(d, nil, vol.Volume, srcVol.Volume, refreshSnapshots, true, allowInconsistent, op)
return genericVFSCopyVolume(d, nil, vol, srcVol, refreshSnapshots, true, allowInconsistent, op)
}

return fmt.Errorf("Failed to transfer main volume: %w", err)
Expand Down

0 comments on commit eca015a

Please sign in to comment.