mount: add grpc method to adjust quota

This commit is contained in:
chrislu
2022-04-02 15:14:37 -07:00
parent a8eefda452
commit 958f880b70
9 changed files with 382 additions and 5 deletions

View File

@@ -0,0 +1,13 @@
package mount
import (
"context"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb/mount_pb"
)
func (wfs *WFS) Configure(ctx context.Context, request *mount_pb.ConfigureRequest) (*mount_pb.ConfigureResponse, error) {
glog.V(0).Infof("quota changed from %d to %d", wfs.option.Quota, request.CollectionCapacity)
wfs.option.Quota = request.GetCollectionCapacity()
return &mount_pb.ConfigureResponse{}, nil
}