aboutsummaryrefslogtreecommitdiff
path: root/weed
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-03-17 00:02:38 -0700
committerchrislu <chris.lu@gmail.com>2022-03-17 00:02:38 -0700
commit7542fd7f4df2c233dfae2afaf194f1d5900f582a (patch)
treec04994eef2615242a373b435c33d39247b69cf33 /weed
parent4042fdf3bb5dc9cab2f6df3911819678bbf03e01 (diff)
downloadseaweedfs-7542fd7f4df2c233dfae2afaf194f1d5900f582a.tar.xz
seaweedfs-7542fd7f4df2c233dfae2afaf194f1d5900f582a.zip
mount: optimize a bit when writing files
Diffstat (limited to 'weed')
-rw-r--r--weed/mount/weedfs_file_mkrm.go7
-rw-r--r--weed/mount/weedfs_file_sync.go7
2 files changed, 8 insertions, 6 deletions
diff --git a/weed/mount/weedfs_file_mkrm.go b/weed/mount/weedfs_file_mkrm.go
index b5676eb02..1f6951b96 100644
--- a/weed/mount/weedfs_file_mkrm.go
+++ b/weed/mount/weedfs_file_mkrm.go
@@ -77,9 +77,10 @@ func (wfs *WFS) Mknod(cancel <-chan struct{}, in *fuse.MknodIn, name string, out
defer wfs.mapPbIdFromFilerToLocal(newEntry)
request := &filer_pb.CreateEntryRequest{
- Directory: string(dirFullPath),
- Entry: newEntry,
- Signatures: []int32{wfs.signature},
+ Directory: string(dirFullPath),
+ Entry: newEntry,
+ Signatures: []int32{wfs.signature},
+ SkipCheckParentDirectory: true,
}
glog.V(1).Infof("mknod: %v", request)
diff --git a/weed/mount/weedfs_file_sync.go b/weed/mount/weedfs_file_sync.go
index c163948ea..1c80329c2 100644
--- a/weed/mount/weedfs_file_sync.go
+++ b/weed/mount/weedfs_file_sync.go
@@ -140,9 +140,10 @@ func (wfs *WFS) doFlush(fh *FileHandle, uid, gid uint32) fuse.Status {
}
request := &filer_pb.CreateEntryRequest{
- Directory: string(dir),
- Entry: entry,
- Signatures: []int32{wfs.signature},
+ Directory: string(dir),
+ Entry: entry,
+ Signatures: []int32{wfs.signature},
+ SkipCheckParentDirectory: true,
}
glog.V(4).Infof("%s set chunks: %v", fileFullPath, len(entry.Chunks))