rbd: return nil if the omap data exists

If the omap data already exits return nil.
so that omap generator will not try to reserve
anything again.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-12-04 13:22:24 +05:30 committed by mergify[bot]
parent 5cddfc454e
commit 99dbe27921

View File

@ -559,6 +559,8 @@ func RegenerateJournal(imageName, volumeID, pool, journalPool, requestName strin
util.ErrorLog(ctx, "failed to add UUID mapping %s: %v", rbdVol, err)
return err
}
// As the omap already exists for this image ID return nil.
return nil
}
rbdVol.ReservedID, rbdVol.RbdImageName, err = j.ReserveName(