summaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fusefrontend_reverse')
-rw-r--r--internal/fusefrontend_reverse/ino_map.go5
-rw-r--r--internal/fusefrontend_reverse/rfs.go6
2 files changed, 3 insertions, 8 deletions
diff --git a/internal/fusefrontend_reverse/ino_map.go b/internal/fusefrontend_reverse/ino_map.go
index 9412343..dae8222 100644
--- a/internal/fusefrontend_reverse/ino_map.go
+++ b/internal/fusefrontend_reverse/ino_map.go
@@ -17,8 +17,3 @@ type inoGenT struct {
func (i *inoGenT) next() uint64 {
return atomic.AddUint64(i.ino, 1)
}
-
-type devIno struct {
- dev uint64
- ino uint64
-}
diff --git a/internal/fusefrontend_reverse/rfs.go b/internal/fusefrontend_reverse/rfs.go
index 7f102cf..aca4b90 100644
--- a/internal/fusefrontend_reverse/rfs.go
+++ b/internal/fusefrontend_reverse/rfs.go
@@ -41,7 +41,7 @@ type ReverseFS struct {
// Inode number generator
inoGen *inoGenT
// Maps backing files device+inode pairs to user-facing unique inode numbers
- inoMap map[devIno]uint64
+ inoMap map[fusefrontend.DevInoStruct]uint64
// Protects map access
inoMapLock sync.Mutex
}
@@ -68,7 +68,7 @@ func NewFS(args fusefrontend.Args) *ReverseFS {
nameTransform: nameTransform,
contentEnc: contentEnc,
inoGen: newInoGen(),
- inoMap: map[devIno]uint64{},
+ inoMap: map[fusefrontend.DevInoStruct]uint64{},
}
}
@@ -167,7 +167,7 @@ func (rfs *ReverseFS) inoAwareStat(relPlainPath string) (*fuse.Attr, fuse.Status
// The file has hard links. We have to give it a stable inode number so
// tar or rsync can find them.
if fi.Mode().IsRegular() && st.Nlink > 1 {
- di := devIno{uint64(st.Dev), st.Ino}
+ di := fusefrontend.DevInoFromStat(st)
rfs.inoMapLock.Lock()
stableIno := rfs.inoMap[di]
if stableIno == 0 {