Commit c071d153 authored by Kirill Smelkov's avatar Kirill Smelkov Committed by Han-Wen Nienhuys

fuse: When parent or child is inode, log it as iX instead of X

For example

	15:12:42.711011 tx 0: NOTIFY_INVAL_ENTRY, {parent i1 sz 8} "file.txt"

instead of

	15:12:42.711011 tx 0: NOTIFY_INVAL_ENTRY, {parent 1 sz 8} "file.txt"

using iX fits into our general logging scheme and makes logs more
self-descriptive.
parent 7b15acfb
...@@ -284,7 +284,7 @@ func (c *FileSystemConnector) lockMount(parent *Inode, name string, root Node, o ...@@ -284,7 +284,7 @@ func (c *FileSystemConnector) lockMount(parent *Inode, name string, root Node, o
node.mountPoint.parentInode = parent node.mountPoint.parentInode = parent
if c.debug { if c.debug {
log.Printf("Mount %T on subdir %s, parent %d", node, log.Printf("Mount %T on subdir %s, parent i%d", node,
name, c.inodeMap.Handle(&parent.handled)) name, c.inodeMap.Handle(&parent.handled))
} }
return node, fuse.OK return node, fuse.OK
......
...@@ -226,7 +226,7 @@ func (me *StatfsOut) string() string { ...@@ -226,7 +226,7 @@ func (me *StatfsOut) string() string {
} }
func (o *NotifyInvalEntryOut) string() string { func (o *NotifyInvalEntryOut) string() string {
return fmt.Sprintf("{parent %d sz %d}", o.Parent, o.NameLen) return fmt.Sprintf("{parent i%d sz %d}", o.Parent, o.NameLen)
} }
func (o *NotifyInvalInodeOut) string() string { func (o *NotifyInvalInodeOut) string() string {
...@@ -234,7 +234,7 @@ func (o *NotifyInvalInodeOut) string() string { ...@@ -234,7 +234,7 @@ func (o *NotifyInvalInodeOut) string() string {
} }
func (o *NotifyInvalDeleteOut) string() string { func (o *NotifyInvalDeleteOut) string() string {
return fmt.Sprintf("{parent %d ch %d sz %d}", o.Parent, o.Child, o.NameLen) return fmt.Sprintf("{parent i%d ch i%d sz %d}", o.Parent, o.Child, o.NameLen)
} }
func (o *NotifyStoreOut) string() string { func (o *NotifyStoreOut) string() string {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment