From 9b8ce55383fb6a0a146d0551a63d62b59be6eeb7 Mon Sep 17 00:00:00 2001
From: Jakob Unterwurzacher
Date: Thu, 11 Jun 2020 23:38:29 +0200
Subject: inomap: clarify TranslateStat function comment

Also, fix the namespaceMap comment.
---
 internal/inomap/inomap.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'internal/inomap')

diff --git a/internal/inomap/inomap.go b/internal/inomap/inomap.go
index 64bb174..82d50b0 100644
--- a/internal/inomap/inomap.go
+++ b/internal/inomap/inomap.go
@@ -35,7 +35,7 @@ const (
 // See package comment for details.
 type InoMap struct {
 	sync.Mutex
-	// namespaces keeps the mapping of (Dev,Flags) tuples to
+	// namespaceMap keeps the mapping of (Dev,Flags) tuples to
 	// 15-bit identifiers (stored in an uint16 with the high bit always zero)
 	namespaceMap map[namespaceData]uint16
 	// spillNext is the next free namespace number in the namespaces map
@@ -97,7 +97,8 @@ func (m *InoMap) Translate(in QIno) (out uint64) {
 	return out
 }
 
-// TranslateStat translates the inode number contained in "st" if necessary.
+// TranslateStat translates (device, ino) pair contained in "st" into a unique
+// inode number and overwrites the ino in "st" with it.
 // Convience wrapper around Translate().
 func (m *InoMap) TranslateStat(st *syscall.Stat_t) {
 	in := QInoFromStat(st)
-- 
cgit v1.2.3