提交 62e3d085 编写于 作者: D Davies Liu

disable xattr by default (--enable-xattr)

上级 01b009da
......@@ -177,7 +177,7 @@ func mount(c *cli.Context) error {
if !c.Bool("no-usage-report") {
go reportUsage(m)
}
err = fuse.Main(conf, c.String("o"), c.Float64("attr-cache"), c.Float64("entry-cache"), c.Float64("dir-entry-cache"))
err = fuse.Main(conf, c.String("o"), c.Float64("attr-cache"), c.Float64("entry-cache"), c.Float64("dir-entry-cache"), c.Bool("enable-xattr"))
if err != nil {
logger.Fatalf("fuse: %s", err)
}
......@@ -229,6 +229,10 @@ func mountFlags() *cli.Command {
Value: 1.0,
Usage: "dir entry cache timeout in seconds",
},
&cli.BoolFlag{
Name: "enable-xattr",
Usage: "enable extended attributes (xattr)",
},
&cli.IntFlag{
Name: "get-timeout",
......
......@@ -404,7 +404,7 @@ func (fs *JFS) StatFs(cancel <-chan struct{}, in *fuse.InHeader, out *fuse.Statf
return 0
}
func Main(conf *vfs.Config, options string, attrcacheto_, entrycacheto_, direntrycacheto_ float64) error {
func Main(conf *vfs.Config, options string, attrcacheto_, entrycacheto_, direntrycacheto_ float64, xattrs bool) error {
if err := syscall.Setpriority(syscall.PRIO_PROCESS, os.Getpid(), -19); err != nil {
logger.Warnf("setpriority: %s", err)
}
......@@ -420,7 +420,7 @@ func Main(conf *vfs.Config, options string, attrcacheto_, entrycacheto_, direntr
opt.SingleThreaded = false
opt.MaxBackground = 50
opt.EnableLocks = true
opt.DisableXAttrs = false
opt.DisableXAttrs = !xattrs
opt.IgnoreSecurityLabels = true
opt.MaxWrite = 1 << 20
opt.MaxReadAhead = 1 << 20
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册