You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
588 B
17 lines
588 B
package mount
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"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) {
|
|
if wfs.option.Collection == "" {
|
|
return nil, fmt.Errorf("mount quota only works when mounted to a new folder with a collection")
|
|
}
|
|
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
|
|
}
|