Added some vanity op descriptions.
parent
2dda1a5ea9
commit
93de940966
|
@ -164,7 +164,7 @@ func (o *commonOp) init(
|
|||
o.opsInFlight = opsInFlight
|
||||
|
||||
// Set up a trace span for this op.
|
||||
o.ctx, o.report = reqtrace.StartSpan(ctx, o.ShortDesc())
|
||||
o.ctx, o.report = reqtrace.StartSpan(ctx, o.op.ShortDesc())
|
||||
}
|
||||
|
||||
func (o *commonOp) Header() OpHeader {
|
||||
|
@ -193,7 +193,7 @@ func (o *commonOp) respondErr(err error) {
|
|||
|
||||
o.Logf(
|
||||
"-> (%s) error: %v",
|
||||
o.ShortDesc(),
|
||||
o.op.ShortDesc(),
|
||||
err)
|
||||
|
||||
o.bazilReq.RespondError(err)
|
||||
|
@ -213,7 +213,7 @@ func (o *commonOp) respond(resp interface{}) {
|
|||
|
||||
// Special case: handle successful ops with no response struct.
|
||||
if resp == nil {
|
||||
o.Logf("-> (%s) OK", o.ShortDesc())
|
||||
o.Logf("-> (%s) OK", o.op.ShortDesc())
|
||||
respond.Call([]reflect.Value{})
|
||||
return
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package fuseops
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
|
@ -143,6 +144,11 @@ type LookUpInodeOp struct {
|
|||
Entry ChildInodeEntry
|
||||
}
|
||||
|
||||
func (o *LookUpInodeOp) ShortDesc() (desc string) {
|
||||
desc = fmt.Sprintf("LookUpInode(parent=%v, name=%q)", o.Parent, o.Name)
|
||||
return
|
||||
}
|
||||
|
||||
func (o *LookUpInodeOp) Respond(err error) {
|
||||
defer o.commonOp.opsInFlight.Done()
|
||||
|
||||
|
@ -317,6 +323,11 @@ type MkDirOp struct {
|
|||
Entry ChildInodeEntry
|
||||
}
|
||||
|
||||
func (o *MkDirOp) ShortDesc() (desc string) {
|
||||
desc = fmt.Sprintf("MkDir(parent=%v, name=%q)", o.Parent, o.Name)
|
||||
return
|
||||
}
|
||||
|
||||
func (o *MkDirOp) Respond(err error) {
|
||||
defer o.commonOp.opsInFlight.Done()
|
||||
|
||||
|
@ -374,6 +385,11 @@ type CreateFileOp struct {
|
|||
Handle HandleID
|
||||
}
|
||||
|
||||
func (o *CreateFileOp) ShortDesc() (desc string) {
|
||||
desc = fmt.Sprintf("CreateFile(parent=%v, name=%q)", o.Parent, o.Name)
|
||||
return
|
||||
}
|
||||
|
||||
func (o *CreateFileOp) Respond(err error) {
|
||||
defer o.commonOp.opsInFlight.Done()
|
||||
|
||||
|
|
Loading…
Reference in New Issue