aboutsummaryrefslogtreecommitdiff
path: root/weed/util/fullpath.go
diff options
context:
space:
mode:
authoryulai.li <blacktear23@gmail.com>2022-06-26 22:43:37 +0800
committeryulai.li <blacktear23@gmail.com>2022-06-26 22:43:37 +0800
commit46e0b629e529f3aff535f90dd25eb719adf1c0d0 (patch)
tree734125b48b6d96f8796a2b89b924312cd169ef0e /weed/util/fullpath.go
parenta5bd0b3a1644a77dcc0b9ff41c4ce8eb3ea0d566 (diff)
parentdc59ccd110a321db7d0b0480631aa95a3d9ba7e6 (diff)
downloadseaweedfs-46e0b629e529f3aff535f90dd25eb719adf1c0d0.tar.xz
seaweedfs-46e0b629e529f3aff535f90dd25eb719adf1c0d0.zip
Update tikv client version and add one PC support
Diffstat (limited to 'weed/util/fullpath.go')
-rw-r--r--weed/util/fullpath.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/weed/util/fullpath.go b/weed/util/fullpath.go
index 85028b052..f52d4d1d0 100644
--- a/weed/util/fullpath.go
+++ b/weed/util/fullpath.go
@@ -41,8 +41,11 @@ func (fp FullPath) Child(name string) FullPath {
return FullPath(dir + "/" + noPrefix)
}
-func (fp FullPath) AsInode() uint64 {
- return uint64(HashStringToLong(string(fp)))
+// AsInode an in-memory only inode representation
+func (fp FullPath) AsInode(unixTime int64) uint64 {
+ inode := uint64(HashStringToLong(string(fp)))
+ inode = inode + uint64(unixTime)*37
+ return inode
}
// split, but skipping the root