cephfs: replace Errorf with ErrorLog in createCloneFromSnapshot

replace Errorf with ErrorLog in createCloneFromSnapshot
for context based logging.

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

View File

@ -162,7 +162,7 @@ func createCloneFromSnapshot(ctx context.Context, parentVolOpt, volOptions *volu
if err != nil {
if !errors.Is(err, ErrCloneInProgress) {
if dErr := purgeVolume(ctx, volumeID(vID.FsSubvolName), cr, volOptions, true); dErr != nil {
klog.Errorf(util.Log(ctx, "failed to delete volume %s: %v"), vID.FsSubvolName, dErr)
util.ErrorLog(ctx, "failed to delete volume %s: %v", vID.FsSubvolName, dErr)
}
}
}
@ -183,7 +183,7 @@ func createCloneFromSnapshot(ctx context.Context, parentVolOpt, volOptions *volu
// in the new cloned volume too. Till then we are explicitly making the size set
err = resizeVolume(ctx, volOptions, cr, volumeID(vID.FsSubvolName), volOptions.Size)
if err != nil {
klog.Errorf(util.Log(ctx, "failed to expand volume %s with error: %v"), vID.FsSubvolName, err)
util.ErrorLog(ctx, "failed to expand volume %s with error: %v", vID.FsSubvolName, err)
return err
}
}