Skip to content

vmbus_server: Move modify_connection into restore and post_restore into start #1165

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

will-j-wright
Copy link
Contributor

@will-j-wright will-j-wright commented Apr 9, 2025

In order to more closely map OpenVMM's restore process onto Hyper-V, remove the need to manually call ServerWithNotifier::post_restore after Server::restore.

  • Move Server::restore to ServerWithNotifier so we can call modify_connection,
  • Move the modify_connection request from post_restore into restore,
  • Rename post_restore to revoke_unclaimed_channels.
  • Remove VmbusRequest::PostRestore and move the revoke_unclaimed_channels call into Start,
  • Remove ModifyConnectionRequest::force, because ServerWithNotifier::restore_channel is now called after modify_connection, meaning there will be no open channels before the latter call.

@will-j-wright will-j-wright requested review from a team as code owners April 9, 2025 20:23
@will-j-wright
Copy link
Contributor Author

will-j-wright commented Apr 9, 2025

I considered adding a flag to ServerTaskInner to track whether or not this is the first start after a restore, but I think the overhead of running revoke_unclaimed_channels on each start isn't enough to really worry about. If anyone thinks otherwise, let me know

@jstarks
Copy link
Member

jstarks commented Apr 10, 2025

I will remove post_restore from the openvmm state machine once you get this in.

Copy link
Member

@SvenGroot SvenGroot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

@will-j-wright will-j-wright force-pushed the vmbus/remove_post_restore branch 2 times, most recently from 040b9b6 to a79eb7d Compare April 11, 2025 19:34
@will-j-wright will-j-wright force-pushed the vmbus/remove_post_restore branch from a79eb7d to 1484a31 Compare April 11, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants