aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-12-05 20:20:44 -0800
committerchrislu <chris.lu@gmail.com>2022-12-05 20:20:44 -0800
commit4f15a52044fbbc664b0c49ca6eb3ac512c93e331 (patch)
tree32f17c5df1beab8ea2ea21b2e3d4f508a855875d
parentdac9c28d05cd61402cf5fbac42507b49b5a4f7a5 (diff)
downloadseaweedfs-origin/testing.tar.xz
seaweedfs-origin/testing.zip
temp disable lockingorigin/testing
-rw-r--r--weed/mount/filehandle.go4
-rw-r--r--weed/mount/weedfs_attr.go4
-rw-r--r--weed/mount/weedfs_dir_lookup.go4
-rw-r--r--weed/mount/weedfs_file_lseek.go4
-rw-r--r--weed/mount/weedfs_file_sync.go4
-rw-r--r--weed/mount/weedfs_xattr.go8
6 files changed, 14 insertions, 14 deletions
diff --git a/weed/mount/filehandle.go b/weed/mount/filehandle.go
index b6ec3d2da..b7c0ca255 100644
--- a/weed/mount/filehandle.go
+++ b/weed/mount/filehandle.go
@@ -71,8 +71,8 @@ func (fh *FileHandle) UpdateEntry(fn func(entry *filer_pb.Entry)) *filer_pb.Entr
}
func (fh *FileHandle) AddChunks(chunks []*filer_pb.FileChunk) {
- fh.entryLock.Lock()
- defer fh.entryLock.Unlock()
+ //fh.entryLock.Lock()
+ //defer fh.entryLock.Unlock()
if fh.entry == nil {
return
diff --git a/weed/mount/weedfs_attr.go b/weed/mount/weedfs_attr.go
index 1d58e0852..013334540 100644
--- a/weed/mount/weedfs_attr.go
+++ b/weed/mount/weedfs_attr.go
@@ -45,8 +45,8 @@ func (wfs *WFS) SetAttr(cancel <-chan struct{}, input *fuse.SetAttrIn, out *fuse
return status
}
if fh != nil {
- fh.entryLock.Lock()
- defer fh.entryLock.Unlock()
+ //fh.entryLock.Lock()
+ //defer fh.entryLock.Unlock()
}
if size, ok := input.GetSize(); ok && entry != nil {
diff --git a/weed/mount/weedfs_dir_lookup.go b/weed/mount/weedfs_dir_lookup.go
index 2d3ea8ae5..ad4e88110 100644
--- a/weed/mount/weedfs_dir_lookup.go
+++ b/weed/mount/weedfs_dir_lookup.go
@@ -58,12 +58,12 @@ func (wfs *WFS) Lookup(cancel <-chan struct{}, header *fuse.InHeader, name strin
inode := wfs.inodeToPath.Lookup(fullFilePath, localEntry.Crtime.Unix(), localEntry.IsDirectory(), len(localEntry.HardLinkId) > 0, localEntry.Inode, true)
if fh, found := wfs.fhmap.FindFileHandle(inode); found {
- fh.entryLock.Lock()
+ //fh.entryLock.Lock()
if entry := fh.GetEntry(); entry != nil {
glog.V(4).Infof("lookup opened file %s size %d", dirPath.Child(localEntry.Name()), filer.FileSize(entry))
localEntry = filer.FromPbEntry(string(dirPath), entry)
}
- fh.entryLock.Unlock()
+ //fh.entryLock.Unlock()
}
wfs.outputFilerEntry(out, inode, localEntry)
diff --git a/weed/mount/weedfs_file_lseek.go b/weed/mount/weedfs_file_lseek.go
index 9d6402f96..81b12d42f 100644
--- a/weed/mount/weedfs_file_lseek.go
+++ b/weed/mount/weedfs_file_lseek.go
@@ -38,8 +38,8 @@ func (wfs *WFS) Lseek(cancel <-chan struct{}, in *fuse.LseekIn, out *fuse.LseekO
// lock the file until the proper offset was calculated
fh.orderedMutex.Acquire(context.Background(), 1)
defer fh.orderedMutex.Release(1)
- fh.entryLock.Lock()
- defer fh.entryLock.Unlock()
+ //fh.entryLock.Lock()
+ //defer fh.entryLock.Unlock()
fileSize := int64(filer.FileSize(fh.GetEntry()))
offset := max(int64(in.Offset), 0)
diff --git a/weed/mount/weedfs_file_sync.go b/weed/mount/weedfs_file_sync.go
index a08a37f9c..252d62466 100644
--- a/weed/mount/weedfs_file_sync.go
+++ b/weed/mount/weedfs_file_sync.go
@@ -118,8 +118,8 @@ func (wfs *WFS) doFlush(fh *FileHandle, uid, gid uint32) fuse.Status {
err := wfs.WithFilerClient(false, func(client filer_pb.SeaweedFilerClient) error {
- fh.entryLock.Lock()
- defer fh.entryLock.Unlock()
+ //fh.entryLock.Lock()
+ //defer fh.entryLock.Unlock()
entry := fh.GetEntry()
if entry == nil {
diff --git a/weed/mount/weedfs_xattr.go b/weed/mount/weedfs_xattr.go
index b03fa01f1..f73dd779d 100644
--- a/weed/mount/weedfs_xattr.go
+++ b/weed/mount/weedfs_xattr.go
@@ -111,8 +111,8 @@ func (wfs *WFS) SetXAttr(cancel <-chan struct{}, input *fuse.SetXAttrIn, attr st
return fuse.ENOENT
}
if fh != nil {
- fh.entryLock.Lock()
- defer fh.entryLock.Unlock()
+ //fh.entryLock.Lock()
+ //defer fh.entryLock.Unlock()
}
if entry.Extended == nil {
@@ -189,8 +189,8 @@ func (wfs *WFS) RemoveXAttr(cancel <-chan struct{}, header *fuse.InHeader, attr
return fuse.OK
}
if fh != nil {
- fh.entryLock.Lock()
- defer fh.entryLock.Unlock()
+ //fh.entryLock.Lock()
+ //defer fh.entryLock.Unlock()
}
if entry.Extended == nil {