SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
fix(mount): skip metadata flush for unlinked-while-open files (#9027)
Chris Lu2e64c0fe2aee
diff --git a/weed/mount/weedfs_file_sync.go b/weed/mount/weedfs_file_sync.goindex 88c88ea97b..adfefebd25 100644--- a/weed/mount/weedfs_file_sync.go+++ b/weed/mount/weedfs_file_sync.go@@ -144,6 +144,13 @@ func (wfs *WFS) doFlush(fh *FileHandle, uid, gid uint32, allowAsync bool) fuse.Sreturn fuse.OK}+ // Skip metadata flush if the file was unlinked while open.+ // The filer entry is already gone; flushing would recreate it.+ if fh.isDeleted {+ glog.V(3).Infof("doFlush %s fh %d: file was unlinked, skipping metadata flush", fileFullPath, fh.fh)+ return fuse.OK+ }+if isOverQuota {return fuse.Status(syscall.ENOSPC)}