diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-01-26 02:50:50 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-01-26 02:50:53 -0800 |
| commit | 3a1d3d3413c5fc6a49c138ed5024f2b907f63d37 (patch) | |
| tree | 387c4e7e4e559942d9bd1d4cfeee1d23599e209f /weed/filesys/file.go | |
| parent | c41961d5cccf4a4b49e5968e0da283c6fb1f47c3 (diff) | |
| download | seaweedfs-3a1d3d3413c5fc6a49c138ed5024f2b907f63d37.tar.xz seaweedfs-3a1d3d3413c5fc6a49c138ed5024f2b907f63d37.zip | |
mount: properly invalidate kernel node cache entry
fix https://github.com/chrislusf/seaweedfs/issues/1752
Diffstat (limited to 'weed/filesys/file.go')
| -rw-r--r-- | weed/filesys/file.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/weed/filesys/file.go b/weed/filesys/file.go index a8d6dac29..a210c5152 100644 --- a/weed/filesys/file.go +++ b/weed/filesys/file.go @@ -45,7 +45,7 @@ func (file *File) fullpath() util.FullPath { func (file *File) Attr(ctx context.Context, attr *fuse.Attr) (err error) { - glog.V(4).Infof("file Attr %s, open:%v, existing attr: %+v", file.fullpath(), file.isOpen, attr) + glog.V(4).Infof("file Attr %s, open:%v existing:%v", file.fullpath(), file.isOpen, attr) entry := file.entry if file.isOpen <= 0 || entry == nil { @@ -54,7 +54,7 @@ func (file *File) Attr(ctx context.Context, attr *fuse.Attr) (err error) { } } - attr.Inode = file.fullpath().AsInode() + // attr.Inode = file.fullpath().AsInode() attr.Valid = time.Second attr.Mode = os.FileMode(entry.Attributes.FileMode) attr.Size = filer.FileSize(entry) @@ -91,9 +91,6 @@ func (file *File) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp func (file *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error) { glog.V(4).Infof("file %v open %+v", file.fullpath(), req) - if USE_DIRECT_IO { - resp.Flags |= fuse.OpenDirectIO - } handle := file.wfs.AcquireHandle(file, req.Uid, req.Gid) |
