Skip to content

Commit b842b28

Browse files
committed
GetCapacityResponse: add maximum_volume_size
This new field has a more precisely defined semantic than the existing available_capacity. It is intended for checking in advance in which topology a CreateVolume call might succeed. Checking that based on available_capacity is less precise, for example because fragmentation might prevent creating a single volume that uses all available capacity. The new value has to be returned in a message to allow the caller to determine whether the value was provided.
1 parent 396c333 commit b842b28

File tree

3 files changed

+375
-271
lines changed

3 files changed

+375
-271
lines changed

csi.proto

+20
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,26 @@ message GetCapacityResponse {
947947
// storage. This field is REQUIRED.
948948
// The value of this field MUST NOT be negative.
949949
int64 available_capacity = 1;
950+
951+
// The largest size that could have been used in a CreateVolume call
952+
// to create a volume with the same parameters as those in
953+
// GetCapacityRequest.
954+
//
955+
// If `volume_capabilities` or `parameters` is
956+
// specified in the request, the Plugin SHALL take those into
957+
// consideration when calculating the maximum volume size of the
958+
// storage.
959+
//
960+
// This field is OPTIONAL. If a Plugin has no restrictions for the
961+
// size of volumes (for example, linear storage with no fragmentation
962+
// issues and no technical limitation for individual volumes), then
963+
// can leave this field unset and only return available_capacity.
964+
Capacity maximum_volume_size = 2 [(alpha_field) = true];
965+
}
966+
967+
message Capacity {
968+
// Number of bytes. MUST NOT be negative.
969+
int64 value = 1;
950970
}
951971
message ControllerGetCapabilitiesRequest {
952972
// Intentionally empty.

0 commit comments

Comments
 (0)