cephfs: replace Errorf with util.ErrorLog in cleanupClone

replace Errorf with util.ErrorLog in cleanupCloneFromSubvolumeSnapshot
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-08-11 17:17:49 +05:30 committed by mergify[bot]
parent e1fb708d48
commit 3fa512617b

View File

@ -140,13 +140,13 @@ func cleanupCloneFromSubvolumeSnapshot(ctx context.Context, volID, cloneID volum
if snapInfo.Protected == snapshotIsProtected {
err = unprotectSnapshot(ctx, parentVolOpt, cr, snapShotID, volID)
if err != nil {
klog.Errorf(util.Log(ctx, "failed to unprotect snapshot %s %v"), snapShotID, err)
util.ErrorLog(ctx, "failed to unprotect snapshot %s %v", snapShotID, err)
return err
}
}
err = deleteSnapshot(ctx, parentVolOpt, cr, snapShotID, volID)
if err != nil {
klog.Errorf(util.Log(ctx, "failed to delete snapshot %s %v"), snapShotID, err)
util.ErrorLog(ctx, "failed to delete snapshot %s %v", snapShotID, err)
return err
}
return nil