aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/wfs.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-01-11 23:44:48 -0800
committerchrislu <chris.lu@gmail.com>2022-01-11 23:44:48 -0800
commit2dcb8cb93b951bd8457cdb670edf2146b068a836 (patch)
treedfbe0e451b3c0f32204cd52e8ea3a617a8ca201f /weed/filesys/wfs.go
parent5bb37d5905bbc2b091540ff96e0b1389e1016029 (diff)
downloadseaweedfs-2dcb8cb93b951bd8457cdb670edf2146b068a836.tar.xz
seaweedfs-2dcb8cb93b951bd8457cdb670edf2146b068a836.zip
POSIX: ensure file and directory inodes are different
this is just an in memory representation. POSIX wants different inode numbers for the same named file or directory.
Diffstat (limited to 'weed/filesys/wfs.go')
-rw-r--r--weed/filesys/wfs.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go
index c9a7ac0a1..63b83f7ef 100644
--- a/weed/filesys/wfs.go
+++ b/weed/filesys/wfs.go
@@ -109,15 +109,15 @@ func NewSeaweedFileSystem(option *Option) *WFS {
wfs.chunkCache = chunk_cache.NewTieredChunkCache(256, option.getUniqueCacheDir(), option.CacheSizeMB, 1024*1024)
}
- wfs.metaCache = meta_cache.NewMetaCache(path.Join(option.getUniqueCacheDir(), "meta"), util.FullPath(option.FilerMountRootPath), option.UidGidMapper, func(filePath util.FullPath) {
+ wfs.metaCache = meta_cache.NewMetaCache(path.Join(option.getUniqueCacheDir(), "meta"), util.FullPath(option.FilerMountRootPath), option.UidGidMapper, func(filePath util.FullPath, isDirectory bool) {
- fsNode := NodeWithId(filePath.AsInode())
+ fsNode := NodeWithId(filePath.AsInode(isDirectory))
if err := wfs.Server.InvalidateNodeData(fsNode); err != nil {
glog.V(4).Infof("InvalidateNodeData %s : %v", filePath, err)
}
dir, name := filePath.DirAndName()
- parent := NodeWithId(util.FullPath(dir).AsInode())
+ parent := NodeWithId(util.FullPath(dir).AsInode(true))
if dir == option.FilerMountRootPath {
parent = NodeWithId(1)
}