summaryrefslogtreecommitdiff
path: root/internal/inomap/inomap.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-06-11 23:38:29 +0200
committerJakob Unterwurzacher2020-06-21 12:01:34 +0200
commit9b8ce55383fb6a0a146d0551a63d62b59be6eeb7 (patch)
tree06d8b8aecabb97dd27748e5ac222abb77a23e465 /internal/inomap/inomap.go
parent2aad58f9ec3386cbf3de6e10a82de51052832a30 (diff)
inomap: clarify TranslateStat function comment
Also, fix the namespaceMap comment.
Diffstat (limited to 'internal/inomap/inomap.go')
-rw-r--r--internal/inomap/inomap.go5
1 files changed, 3 insertions, 2 deletions
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)