rrdp: discard stats#7
Open
AnthoineB wants to merge 1 commit intoxcp-ng:masterfrom
Open
Conversation
Pull Request Test Coverage Report for Build 14044455376Details
💛 - Coveralls |
6656ca0 to
8cc3781
Compare
gthvn1
requested changes
Mar 24, 2025
| } | ||
| [@@little_endian]] | ||
|
|
||
| [%%cstruct |
There was a problem hiding this comment.
you don't need a V2 I think. You can put it in the stats struct and just have wrappers that checks version when accessing these specific fields.
There was a problem hiding this comment.
But as discussed the problem is now we are not able to know the size of v1 vs the size of v2 that is used by "copy"... So it looks like a v2 is needed. To avoid generating unneeded function you can do something like:
type stats_v2 = {
_version: uint32_t
; _pad: uint32_t
; _oo_reqs: uint64_t
; _read_reqs_submitted: uint64_t
; _read_reqs_completed: uint64_t
; _read_sectors: uint64_t
; _read_total_ticks: uint64_t
; _write_reqs_submitted: uint64_t
; _write_reqs_completed: uint64_t
; _write_sectors: uint64_t
; _write_total_ticks: uint64_t
; _io_errors: uint64_t
; _flags: uint64_t
; discard_reqs_submitted: uint64_t
; discard_reqs_completed: uint64_t
; discard_sectors: uint64_t
; discard_total_ticks: uint64_t
}
[@@little_endian]]
Not sure if it is the correct approach but you will have both sizes and new successors accessors to V2 fields...
565cf1c to
09746c2
Compare
Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@vates.tech>
09746c2 to
a1b83c1
Compare
|
It looks good to me. At least I don't see a better way to do that. Also as it manages the blktap V2 struct I think that it can be proposed upstream... maybe? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an extended stats structure to get discards' fields and compute new statistics: