cleanup: refactor functions to accept a context parameter

Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
Praveen M
2024-03-04 20:43:31 +05:30
committed by mergify[bot]
parent c90f7ed777
commit e345b26340
21 changed files with 104 additions and 97 deletions

View File

@ -155,7 +155,7 @@ func (rv *rbdVolume) createCloneFromImage(ctx context.Context, parentVol *rbdVol
return err
}
err = parentVol.copyEncryptionConfig(&rv.rbdImage, true)
err = parentVol.copyEncryptionConfig(ctx, &rv.rbdImage, true)
if err != nil {
return fmt.Errorf("failed to copy encryption config for %q: %w", rv, err)
}
@ -232,7 +232,7 @@ func (rv *rbdVolume) doSnapClone(ctx context.Context, parentVol *rbdVolume) erro
return errClone
}
err = parentVol.copyEncryptionConfig(&rv.rbdImage, true)
err = parentVol.copyEncryptionConfig(ctx, &rv.rbdImage, true)
if err != nil {
return fmt.Errorf("failed to copy encryption config for %q: %w", rv, err)
}