Browse Source

adjust error and log

pull/809/head
Chris Lu 6 years ago
parent
commit
79168ab0bb
  1. 2
      weed/filesys/dir_rename.go
  2. 6
      weed/filesys/file.go

2
weed/filesys/dir_rename.go

@ -26,7 +26,7 @@ func (dir *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDirector
glog.V(4).Infof("find existing directory entry: %v", request) glog.V(4).Infof("find existing directory entry: %v", request)
resp, err := client.LookupDirectoryEntry(ctx, request) resp, err := client.LookupDirectoryEntry(ctx, request)
if err != nil { if err != nil {
glog.V(0).Infof("renaming find %s/%s: %v", dir.Path, req.OldName, err)
glog.V(3).Infof("renaming find %s/%s: %v", dir.Path, req.OldName, err)
return fuse.ENOENT return fuse.ENOENT
} }

6
weed/filesys/file.go

@ -145,13 +145,13 @@ func (file *File) maybeLoadAttributes(ctx context.Context) error {
resp, err := client.LookupDirectoryEntry(ctx, request) resp, err := client.LookupDirectoryEntry(ctx, request)
if err != nil { if err != nil {
glog.V(0).Infof("file attr read file %v: %v", request, err)
return err
glog.V(3).Infof("file attr read file %v: %v", request, err)
return fuse.ENOENT
} }
file.entry = resp.Entry file.entry = resp.Entry
glog.V(1).Infof("file attr %v %+v: %d", file.fullpath(), file.entry.Attributes, filer2.TotalSize(file.entry.Chunks))
glog.V(3).Infof("file attr %v %+v: %d", file.fullpath(), file.entry.Attributes, filer2.TotalSize(file.entry.Chunks))
file.wfs.listDirectoryEntriesCache.Set(file.fullpath(), file.entry, file.wfs.option.EntryCacheTtl) file.wfs.listDirectoryEntriesCache.Set(file.fullpath(), file.entry, file.wfs.option.EntryCacheTtl)

Loading…
Cancel
Save