diff options
| author | Guang Jiong Lou <7991675+27149chen@users.noreply.github.com> | 2024-09-17 12:02:21 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-16 21:02:21 -0700 |
| commit | 6c986e9d70098404832d11d81faf7605b9c742a6 (patch) | |
| tree | cffcf609c9a316f86a680660ec71c6e041a52996 /weed/filer/filer_conf.go | |
| parent | e73ab5c0c49dfbd1870bccbd1e6d694d46fc8d73 (diff) | |
| download | seaweedfs-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/filer/filer_conf.go')
| -rw-r--r-- | weed/filer/filer_conf.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/weed/filer/filer_conf.go b/weed/filer/filer_conf.go index 69755a16a..5ff61ef94 100644 --- a/weed/filer/filer_conf.go +++ b/weed/filer/filer_conf.go @@ -4,10 +4,11 @@ import ( "bytes" "context" "fmt" + "io" + "github.com/seaweedfs/seaweedfs/weed/pb" "github.com/seaweedfs/seaweedfs/weed/wdclient" "google.golang.org/grpc" - "io" "github.com/seaweedfs/seaweedfs/weed/glog" "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" @@ -111,7 +112,7 @@ func (fc *FilerConf) doLoadConf(conf *filer_pb.FilerConf) (err error) { return nil } -func (fc *FilerConf) GetLocationConf(locationPrefix string)(locConf *filer_pb.FilerConf_PathConf, found bool) { +func (fc *FilerConf) GetLocationConf(locationPrefix string) (locConf *filer_pb.FilerConf_PathConf, found bool) { return fc.rules.Get([]byte(locationPrefix)) } @@ -188,6 +189,7 @@ func mergePathConf(a, b *filer_pb.FilerConf_PathConf) { a.Rack = util.Nvl(b.Rack, a.Rack) a.DataNode = util.Nvl(b.DataNode, a.DataNode) a.DisableChunkDeletion = b.DisableChunkDeletion || a.DisableChunkDeletion + a.Worm = b.Worm || a.Worm } func (fc *FilerConf) ToProto() *filer_pb.FilerConf { |
