-
Notifications
You must be signed in to change notification settings - Fork 292
xapi_vdi_helpers: actually write raw vdi when possible #6334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Pau Ruiz Safont <[email protected]>
@@ -184,7 +184,7 @@ let get_pointer half = | |||
(* Lay out a blank double-buffered redo log on the given block device. *) | |||
(* May raise Unixext.Timeout exception *) | |||
let initialise_redo_log block_dev_fd target_response_time = | |||
ignore_int (Unixext.seek_to block_dev_fd 0) ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change make it more efficient, or just come out from code style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be more efficient since there's one closure (function) being called. But benefits are marginal, it's more about introducing the style to the codebase so we can stop calling ignore without using types
We are now replacing |
Which substitution is missing a type annotation? All of them are meant to be |
Sorry, was misreading this - it's now at the end |
This way of using ignores doesn't need specialized functions and can be used with parametrized types (_ list) to avoid partial application. Signed-off-by: Pau Ruiz Safont <[email protected]>
A regression made the function every single time: 5ac7032 Signed-off-by: Pau Ruiz Safont <[email protected]>
631516e
to
4e88aba
Compare
An
if ... then raise exn;
was misread and make the code after impossible to execute, when that was not the intention.Remove all the ignore_ functions from stdext: a plain ignore with a type annotation can replace these. We should start using those for all ignores (there are too many of them, and can't be easily automated to do it in this PR)
Passes internal tests: 213465 (one failure due to the recent vlan + clustering issue)