diff --git a/pkg/spdk/backup.go b/pkg/spdk/backup.go index 76730d05..6e7b36c4 100644 --- a/pkg/spdk/backup.go +++ b/pkg/spdk/backup.go @@ -408,10 +408,9 @@ func (b *Backup) constructMappings() *btypes.Mappings { func (b *Backup) findIndex(lvolName string) int { if lvolName == "" { - if b.replica.BackingImage != nil { - return 0 - } - return 1 + // Note that, 0 can be a backing image if ActiveChanin[0] is not nil. + // Caller should handle this case + return 0 } for i, lvol := range b.replica.ActiveChain {