mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-22 20:53:32 +08:00
support write once read many
fix https://github.com/seaweedfs/seaweedfs/issues/5954
This commit is contained in:
@@ -33,6 +33,7 @@ type MountOptions struct {
|
||||
localSocket *string
|
||||
disableXAttr *bool
|
||||
extraOptions []string
|
||||
writeOnceReadMany *bool
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -70,6 +71,7 @@ func init() {
|
||||
mountOptions.debugPort = cmdMount.Flag.Int("debug.port", 6061, "http port for debugging")
|
||||
mountOptions.localSocket = cmdMount.Flag.String("localSocket", "", "default to /tmp/seaweedfs-mount-<mount_dir_hash>.sock")
|
||||
mountOptions.disableXAttr = cmdMount.Flag.Bool("disableXAttr", false, "disable xattr")
|
||||
mountOptions.writeOnceReadMany = cmdMount.Flag.Bool("writeOnceReadMany", false, "write once, read many times")
|
||||
|
||||
mountCpuProfile = cmdMount.Flag.String("cpuprofile", "", "cpu profile output file")
|
||||
mountMemProfile = cmdMount.Flag.String("memprofile", "", "memory profile output file")
|
||||
|
@@ -247,6 +247,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
|
||||
Cipher: cipher,
|
||||
UidGidMapper: uidGidMapper,
|
||||
DisableXAttr: *option.disableXAttr,
|
||||
WriteOnceReadMany: *option.writeOnceReadMany,
|
||||
})
|
||||
|
||||
// create mount root
|
||||
|
Reference in New Issue
Block a user