Browse Source

mount: invalidate xattr

pull/1165/head
Chris Lu 5 years ago
parent
commit
c42b023960
  1. 6
      weed/filesys/dir.go
  2. 6
      weed/filesys/file.go

6
weed/filesys/dir.go

@ -343,6 +343,8 @@ func (dir *Dir) Setxattr(ctx context.Context, req *fuse.SetxattrRequest) error {
return err
}
dir.wfs.listDirectoryEntriesCache.Delete(dir.Path)
return dir.saveEntry(ctx)
}
@ -359,6 +361,8 @@ func (dir *Dir) Removexattr(ctx context.Context, req *fuse.RemovexattrRequest) e
return err
}
dir.wfs.listDirectoryEntriesCache.Delete(dir.Path)
return dir.saveEntry(ctx)
}
@ -375,7 +379,7 @@ func (dir *Dir) Listxattr(ctx context.Context, req *fuse.ListxattrRequest, resp
return err
}
return dir.saveEntry(ctx)
return nil
}

6
weed/filesys/file.go

@ -144,6 +144,8 @@ func (file *File) Setxattr(ctx context.Context, req *fuse.SetxattrRequest) error
return err
}
file.wfs.listDirectoryEntriesCache.Delete(file.fullpath())
return file.saveEntry(ctx)
}
@ -160,6 +162,8 @@ func (file *File) Removexattr(ctx context.Context, req *fuse.RemovexattrRequest)
return err
}
file.wfs.listDirectoryEntriesCache.Delete(file.fullpath())
return file.saveEntry(ctx)
}
@ -176,7 +180,7 @@ func (file *File) Listxattr(ctx context.Context, req *fuse.ListxattrRequest, res
return err
}
return file.saveEntry(ctx)
return nil
}

Loading…
Cancel
Save