|
@ -7,7 +7,6 @@ import ( |
|
|
"github.com/seaweedfs/seaweedfs/weed/filer" |
|
|
"github.com/seaweedfs/seaweedfs/weed/filer" |
|
|
"github.com/seaweedfs/seaweedfs/weed/glog" |
|
|
"github.com/seaweedfs/seaweedfs/weed/glog" |
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" |
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" |
|
|
"github.com/seaweedfs/seaweedfs/weed/util" |
|
|
|
|
|
"syscall" |
|
|
"syscall" |
|
|
"time" |
|
|
"time" |
|
|
) |
|
|
) |
|
@ -90,6 +89,8 @@ func (wfs *WFS) Fsync(cancel <-chan struct{}, in *fuse.FsyncIn) (code fuse.Statu |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (wfs *WFS) doFlush(fh *FileHandle, uid, gid uint32) fuse.Status { |
|
|
func (wfs *WFS) doFlush(fh *FileHandle, uid, gid uint32) fuse.Status { |
|
|
|
|
|
fh.Lock() |
|
|
|
|
|
defer fh.Unlock() |
|
|
|
|
|
|
|
|
// flush works at fh level
|
|
|
// flush works at fh level
|
|
|
fileFullPath := fh.FullPath() |
|
|
fileFullPath := fh.FullPath() |
|
@ -104,9 +105,6 @@ func (wfs *WFS) doFlush(fh *FileHandle, uid, gid uint32) fuse.Status { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
fhActiveLock := fh.wfs.fhLockTable.AcquireLock("doFlush", fh.fh, util.ExclusiveLock) |
|
|
|
|
|
defer fh.wfs.fhLockTable.ReleaseLock(fh.fh, fhActiveLock) |
|
|
|
|
|
|
|
|
|
|
|
if !fh.dirtyMetadata { |
|
|
if !fh.dirtyMetadata { |
|
|
return fuse.OK |
|
|
return fuse.OK |
|
|
} |
|
|
} |
|
|