diff --git a/internal/rbd/controllerserver.go b/internal/rbd/controllerserver.go index e632518fec49..bef86388e128 100644 --- a/internal/rbd/controllerserver.go +++ b/internal/rbd/controllerserver.go @@ -1340,10 +1340,10 @@ func (cs *ControllerServer) doSnapshotClone( return nil, err } + // update rbd image name + rbdSnap.RbdImageName = cloneRbd.RbdImageName err = cloneRbd.createSnapshot(ctx, rbdSnap) if err != nil { - // update rbd image name for logging - rbdSnap.RbdImageName = cloneRbd.RbdImageName log.ErrorLog(ctx, "failed to create snapshot %s: %v", rbdSnap, err) return cloneRbd, err