cephfs: replace Errorf with ErrorLog in getSubVolumeInfo

replace Errorf with ErrorLog in getSubVolumeInfo
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-08-11 17:54:15 +05:30 committed by mergify[bot]
parent 2b7aade289
commit f3d9b8933b

View File

@ -102,7 +102,7 @@ func getSubVolumeInfo(ctx context.Context, volOptions *volumeOptions, cr *util.C
"-n", cephEntityClientPrefix+cr.ID,
"--keyfile="+cr.KeyFile)
if err != nil {
klog.Errorf(util.Log(ctx, "failed to get subvolume info for the vol %s(%s)"), string(volID), err)
util.ErrorLog(ctx, "failed to get subvolume info for the vol %s(%s)", string(volID), err)
if strings.HasPrefix(err.Error(), ErrVolumeNotFound.Error()) {
return info, ErrVolumeNotFound
}