aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/weedfs.go
diff options
context:
space:
mode:
authorGuang Jiong Lou <7991675+27149chen@users.noreply.github.com>2024-09-17 12:02:21 +0800
committerGitHub <noreply@github.com>2024-09-16 21:02:21 -0700
commit6c986e9d70098404832d11d81faf7605b9c742a6 (patch)
treecffcf609c9a316f86a680660ec71c6e041a52996 /weed/mount/weedfs.go
parente73ab5c0c49dfbd1870bccbd1e6d694d46fc8d73 (diff)
downloadseaweedfs-6c986e9d70098404832d11d81faf7605b9c742a6.tar.xz
seaweedfs-6c986e9d70098404832d11d81faf7605b9c742a6.zip
improve worm support (#5983)
* improve worm support Signed-off-by: lou <alex1988@outlook.com> * worm mode in filer Signed-off-by: lou <alex1988@outlook.com> * update after review Signed-off-by: lou <alex1988@outlook.com> * update after review Signed-off-by: lou <alex1988@outlook.com> * move to fs configure Signed-off-by: lou <alex1988@outlook.com> * remove flag Signed-off-by: lou <alex1988@outlook.com> * update after review Signed-off-by: lou <alex1988@outlook.com> * support worm hardlink Signed-off-by: lou <alex1988@outlook.com> * update after review Signed-off-by: lou <alex1988@outlook.com> * typo Signed-off-by: lou <alex1988@outlook.com> * sync filer conf Signed-off-by: lou <alex1988@outlook.com> --------- Signed-off-by: lou <alex1988@outlook.com>
Diffstat (limited to 'weed/mount/weedfs.go')
-rw-r--r--weed/mount/weedfs.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/weed/mount/weedfs.go b/weed/mount/weedfs.go
index 6a1081113..4f029bba8 100644
--- a/weed/mount/weedfs.go
+++ b/weed/mount/weedfs.go
@@ -47,8 +47,6 @@ type Option struct {
Quota int64
DisableXAttr bool
- WriteOnceReadMany bool
-
MountUid uint32
MountGid uint32
MountMode os.FileMode
@@ -82,6 +80,7 @@ type WFS struct {
fuseServer *fuse.Server
IsOverQuota bool
fhLockTable *util.LockTable[FileHandleId]
+ FilerConf *filer.FilerConf
}
func NewSeaweedFileSystem(option *Option) *WFS {
@@ -141,10 +140,19 @@ func NewSeaweedFileSystem(option *Option) *WFS {
return wfs
}
-func (wfs *WFS) StartBackgroundTasks() {
+func (wfs *WFS) StartBackgroundTasks() error {
+ fn, err := wfs.subscribeFilerConfEvents()
+ if err != nil {
+ return err
+ }
+
+ go fn()
+
startTime := time.Now()
go meta_cache.SubscribeMetaEvents(wfs.metaCache, wfs.signature, wfs, wfs.option.FilerMountRootPath, startTime.UnixNano())
go wfs.loopCheckQuota()
+
+ return nil
}
func (wfs *WFS) String() string {