mount2: use consistent inode

This commit is contained in:
chrislu
2022-02-25 00:53:27 -08:00
parent ceaf993a27
commit be3fc77391
14 changed files with 513 additions and 467 deletions

View File

@@ -0,0 +1,16 @@
package filer
import (
"github.com/chrislusf/seaweedfs/weed/util"
)
const (
HARD_LINK_MARKER = '\x01'
)
type HardLinkId []byte // 16 bytes + 1 marker byte
func NewHardLinkId() HardLinkId {
bytes := append(util.RandomBytes(16), HARD_LINK_MARKER)
return bytes
}