summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-04-19 22:09:21 +0200
committerJakob Unterwurzacher2020-04-19 22:09:21 +0200
commit483054efaa1bd965b41265c681a78fb98e51b739 (patch)
tree709edb831b4536fdca97bf7e3c7c29958bc4dc0a /internal
parent9f9d59ded94f648202505e278f67667879e60be8 (diff)
inomap: comment constants
Diffstat (limited to 'internal')
-rw-r--r--internal/inomap/inomap.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/inomap/inomap.go b/internal/inomap/inomap.go
index 1a92156..c277849 100644
--- a/internal/inomap/inomap.go
+++ b/internal/inomap/inomap.go
@@ -21,9 +21,12 @@ import (
)
const (
+ // max value of 15 bit namespace id
maxNamespaceId = 1<<15 - 1
+ // max value of 48 bit passthru inode number
maxPassthruIno = 1<<48 - 1
- maxSpillIno = 1<<63 - 1
+ // max value of 63 bit spill inode number
+ maxSpillIno = 1<<63 - 1
)
// InoMap stores the maps using for inode number translation.
@@ -31,7 +34,7 @@ const (
type InoMap struct {
sync.Mutex
// namespaces keeps the mapping of (Dev,Flags) tuples to
- // uint16 identifiers
+ // 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
namespaceNext uint16