summaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/ino_map.go
blob: 94123430e39c7561aa39d108455605d909da9c25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package fusefrontend_reverse

import (
	"sync/atomic"
)

func newInoGen() *inoGenT {
	var ino uint64 = 1
	return &inoGenT{&ino}
}

type inoGenT struct {
	ino *uint64
}

// Get the next inode counter value
func (i *inoGenT) next() uint64 {
	return atomic.AddUint64(i.ino, 1)
}

type devIno struct {
	dev uint64
	ino uint64
}