cephfs: replace Errorf with util.ErrorLog in getCloneInfo

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

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-08-11 17:21:37 +05:30 committed by mergify[bot]
parent ae6b77f105
commit 71a6dc3ba8

View File

@ -22,8 +22,6 @@ import (
"fmt" "fmt"
"github.com/ceph/ceph-csi/internal/util" "github.com/ceph/ceph-csi/internal/util"
klog "k8s.io/klog/v2"
) )
const ( const (
@ -219,7 +217,7 @@ func getCloneInfo(ctx context.Context, volOptions *volumeOptions, cr *util.Crede
"ceph", "ceph",
args[:]...) args[:]...)
if err != nil { if err != nil {
klog.Errorf(util.Log(ctx, "failed to get subvolume clone info %s(%s) in fs %s"), string(volID), err, volOptions.FsName) util.ErrorLog(ctx, "failed to get subvolume clone info %s(%s) in fs %s", string(volID), err, volOptions.FsName)
return clone, err return clone, err
} }
return clone, nil return clone, nil