diff options
Diffstat (limited to 'weed/mount/weedfs_grpc_server.go')
| -rw-r--r-- | weed/mount/weedfs_grpc_server.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/mount/weedfs_grpc_server.go b/weed/mount/weedfs_grpc_server.go index 1227372d8..4b2fdffa6 100644 --- a/weed/mount/weedfs_grpc_server.go +++ b/weed/mount/weedfs_grpc_server.go @@ -2,11 +2,15 @@ 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 |
