Skip to content

Commit

Permalink
Addressed Ben's simplifications and fixed the typos he found.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbraganza committed Feb 23, 2024
1 parent 21ccc44 commit c826be2
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 117 deletions.
64 changes: 25 additions & 39 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1939,7 +1939,7 @@ message BlockMetadata {
int64 byte_offset = 1;

// This is the size of the data range.
// size_bytes MUST be greater than 0.
// size_bytes MUST be greater than zero.
// This field is REQUIRED.
int64 size_bytes = 2;
}
Expand Down Expand Up @@ -1973,11 +1973,10 @@ message GetMetadataAllocatedRequest {
// position immediately after the last byte of the last data range
// received, if continuing an interrupted operation, or zero if not.
// The SP MUST ensure that the returned response stream does not
// contain BlockMetadata tuples that start before but not overlap
// the requested starting_offset: i.e. if S is the requested
// starting_offset, and B0 is block_metadata[0] of the first message
// in the response stream, then either (S < B0.byte_offset) must be
// true or else (S < B0.byte_offset + B0.size_bytes) must be true.
// contain BlockMetadata tuples that end before the requested
// starting_offset: i.e. if S is the requested starting_offset, and
// B0 is block_metadata[0] of the first message in the response
// stream, then (S < B0.byte_offset + B0.size_bytes) must be true.
// This field is REQUIRED.
int64 starting_offset = 2;

Expand Down Expand Up @@ -2017,20 +2016,14 @@ message GetMetadataAllocatedResponse {
// If the value of max_results in the GetMetadataAllocatedRequest
// message is greater than zero, then the number of entries in this
// list MUST be less than or equal to that value.
// The byte_offset field of each message MUST be strictly increasing.
// The computation of the data range in the first BlockMetadata
// message in the stream of GetMetadataAllocatedResponse messages
// returned MUST consider the starting_offset requested in the
// GetMetadataAllocatedRequest message.
// The SP MUST NOT return data ranges for which byte_offset plus
// size_bytes is less than or equal to starting_offset.
// Allocated data ranges which overlap the starting_offset
// or for which byte_offset plus size_bytes is greater than
// starting_offset MUST be returned by the SP.
// BlockMetadata messages MUST NOT overlap for a given snapshot, i.e.
// for any two BlockMetadata messages, A and B, if
// A.byte_offset < B.byte_offset then
// A.byte_offset + A.size_bytes <= B.byte_offset MUST be true.
// The SP MUST respect the value of starting_offset in the request.
// The byte_offset fields of adjacent BlockMetadata messages
// MUST be strictly increasing and messages MUST NOT overlap:
// i.e. for any two BlockMetadata messages, A and B, if A is returned
// before B, then (A.byte_offset + A.size_bytes <= B.byte_offset)
// MUST be true.
// This MUST also be true if A and B are from block_metadata lists in
// different GetMetadataAllocatedResponse messages in the gRPC stream.
// This field is OPTIONAL.
repeated BlockMetadata block_metadata = 3;
}
Expand All @@ -2056,11 +2049,10 @@ message GetMetadataDeltaRequest {
// position immediately after the last byte of the last data range
// received, if continuing an interrupted operation, or zero if not.
// The SP MUST ensure that the returned response stream does not
// contain BlockMetadata tuples that start before but not overlap
// the requested starting_offset: i.e. if S is the requested
// starting_offset, and B0 is block_metadata[0] of the first message
// in the response stream, then either (S < B0.byte_offset) must be
// true or else (S < B0.byte_offset + B0.size_bytes) must be true.
// contain BlockMetadata tuples that end before the requested
// starting_offset: i.e. if S is the requested starting_offset, and
// B0 is block_metadata[0] of the first message in the response
// stream, then (S < B0.byte_offset + B0.size_bytes) must be true.
// This field is REQUIRED.
int64 starting_offset = 3;

Expand Down Expand Up @@ -2101,20 +2093,14 @@ message GetMetadataDeltaResponse {
// If the value of max_results in the GetMetadataDeltaRequest message
// is greater than zero, then the number of entries in this list MUST
// be less than or equal to that value.
// The byte_offset field of each message MUST be strictly increasing.
// The computation of the data range in the first BlockMetadata
// message in the stream of GetMetadataDeltaResponse messages
// returned MUST consider the starting_offset requested in the
// GetMetadataDeltaRequest message.
// The SP MUST NOT return data ranges for which byte_offset plus
// size_bytes is less than or equal to starting_offset.
// Changed data ranges which overlap the starting_offset
// or for which byte_offset plus size_bytes is greater than
// starting_offset MUST be returned by the SP.
// BlockMetadata messages MUST NOT overlap for a given snapshot, i.e.
// for any two BlockMetadata messages, A and B, if
// A.byte_offset < B.byte_offset then
// A.byte_offset + A.size_bytes <= B.byte_offset MUST be true.
// The SP MUST respect the value of starting_offset in the request.
// The byte_offset fields of adjacent BlockMetadata messages
// MUST be strictly increasing and messages MUST NOT overlap:
// i.e. for any two BlockMetadata messages, A and B, if A is returned
// before B, then (A.byte_offset + A.size_bytes <= B.byte_offset)
// MUST be true.
// This MUST also be true if A and B are from block_metadata lists in
// different GetMetadataDeltaResponse messages in the gRPC stream.
// This field is OPTIONAL.
repeated BlockMetadata block_metadata = 3;
}
Expand Down
64 changes: 25 additions & 39 deletions lib/go/csi/csi.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 25 additions & 39 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -3189,7 +3189,7 @@ message BlockMetadata {
int64 byte_offset = 1;
// This is the size of the data range.
// size_bytes MUST be greater than 0.
// size_bytes MUST be greater than zero.
// This field is REQUIRED.
int64 size_bytes = 2;
}
Expand Down Expand Up @@ -3260,11 +3260,10 @@ message GetMetadataAllocatedRequest {
// position immediately after the last byte of the last data range
// received, if continuing an interrupted operation, or zero if not.
// The SP MUST ensure that the returned response stream does not
// contain BlockMetadata tuples that start before but not overlap
// the requested starting_offset: i.e. if S is the requested
// starting_offset, and B0 is block_metadata[0] of the first message
// in the response stream, then either (S < B0.byte_offset) must be
// true or else (S < B0.byte_offset + B0.size_bytes) must be true.
// contain BlockMetadata tuples that end before the requested
// starting_offset: i.e. if S is the requested starting_offset, and
// B0 is block_metadata[0] of the first message in the response
// stream, then (S < B0.byte_offset + B0.size_bytes) must be true.
// This field is REQUIRED.
int64 starting_offset = 2;
Expand Down Expand Up @@ -3304,20 +3303,14 @@ message GetMetadataAllocatedResponse {
// If the value of max_results in the GetMetadataAllocatedRequest
// message is greater than zero, then the number of entries in this
// list MUST be less than or equal to that value.
// The byte_offset field of each message MUST be strictly increasing.
// The computation of the data range in the first BlockMetadata
// message in the stream of GetMetadataAllocatedResponse messages
// returned MUST consider the starting_offset requested in the
// GetMetadataAllocatedRequest message.
// The SP MUST NOT return data ranges for which byte_offset plus
// size_bytes is less than or equal to starting_offset.
// Allocated data ranges which overlap the starting_offset
// or for which byte_offset plus size_bytes is greater than
// starting_offset MUST be returned by the SP.
// BlockMetadata messages MUST NOT overlap for a given snapshot, i.e.
// for any two BlockMetadata messages, A and B, if
// A.byte_offset < B.byte_offset then
// A.byte_offset + A.size_bytes <= B.byte_offset MUST be true.
// The SP MUST respect the value of starting_offset in the request.
// The byte_offset fields of adjacent BlockMetadata messages
// MUST be strictly increasing and messages MUST NOT overlap:
// i.e. for any two BlockMetadata messages, A and B, if A is returned
// before B, then (A.byte_offset + A.size_bytes <= B.byte_offset)
// MUST be true.
// This MUST also be true if A and B are from block_metadata lists in
// different GetMetadataAllocatedResponse messages in the gRPC stream.
// This field is OPTIONAL.
repeated BlockMetadata block_metadata = 3;
}
Expand Down Expand Up @@ -3361,11 +3354,10 @@ message GetMetadataDeltaRequest {
// position immediately after the last byte of the last data range
// received, if continuing an interrupted operation, or zero if not.
// The SP MUST ensure that the returned response stream does not
// contain BlockMetadata tuples that start before but not overlap
// the requested starting_offset: i.e. if S is the requested
// starting_offset, and B0 is block_metadata[0] of the first message
// in the response stream, then either (S < B0.byte_offset) must be
// true or else (S < B0.byte_offset + B0.size_bytes) must be true.
// contain BlockMetadata tuples that end before the requested
// starting_offset: i.e. if S is the requested starting_offset, and
// B0 is block_metadata[0] of the first message in the response
// stream, then (S < B0.byte_offset + B0.size_bytes) must be true.
// This field is REQUIRED.
int64 starting_offset = 3;
Expand Down Expand Up @@ -3406,20 +3398,14 @@ message GetMetadataDeltaResponse {
// If the value of max_results in the GetMetadataDeltaRequest message
// is greater than zero, then the number of entries in this list MUST
// be less than or equal to that value.
// The byte_offset field of each message MUST be strictly increasing.
// The computation of the data range in the first BlockMetadata
// message in the stream of GetMetadataDeltaResponse messages
// returned MUST consider the starting_offset requested in the
// GetMetadataDeltaRequest message.
// The SP MUST NOT return data ranges for which byte_offset plus
// size_bytes is less than or equal to starting_offset.
// Changed data ranges which overlap the starting_offset
// or for which byte_offset plus size_bytes is greater than
// starting_offset MUST be returned by the SP.
// BlockMetadata messages MUST NOT overlap for a given snapshot, i.e.
// for any two BlockMetadata messages, A and B, if
// A.byte_offset < B.byte_offset then
// A.byte_offset + A.size_bytes <= B.byte_offset MUST be true.
// The SP MUST respect the value of starting_offset in the request.
// The byte_offset fields of adjacent BlockMetadata messages
// MUST be strictly increasing and messages MUST NOT overlap:
// i.e. for any two BlockMetadata messages, A and B, if A is returned
// before B, then (A.byte_offset + A.size_bytes <= B.byte_offset)
// MUST be true.
// This MUST also be true if A and B are from block_metadata lists in
// different GetMetadataDeltaResponse messages in the gRPC stream.
// This field is OPTIONAL.
repeated BlockMetadata block_metadata = 3;
}
Expand Down

0 comments on commit c826be2

Please sign in to comment.