Skip to content

xen-store: handle short XenStore request writes - #18

Open
lkpdn wants to merge 1 commit into
rust-vmm:mainfrom
lkpdn:pr-short-write
Open

xen-store: handle short XenStore request writes#18
lkpdn wants to merge 1 commit into
rust-vmm:mainfrom
lkpdn:pr-short-write

Conversation

@lkpdn

@lkpdn lkpdn commented Aug 24, 2026

Copy link
Copy Markdown

Summary of the PR

xs_transaction() writes the request header with write_all(), then sends the payload with one writev(). A short write leaves XenStore waiting for the rest while the client waits for a reply. EINTR leaves the header stranded on the stream.

Build each payload as one byte buffer and use write_all() for both parts. This retries short writes and EINTR, and removes the raw iovec handling and nix dependency.

Requirements

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

xs_transaction() writes the request header with write_all(), then sends
the payload with one writev(). A short write leaves XenStore waiting for
the rest while the client waits for a reply. EINTR leaves the header
stranded on the stream.

Build each payload as one byte buffer and use write_all() for both
parts. This retries short writes and EINTR, and removes the raw iovec
handling and nix dependency.

Add deterministic coverage for both cases.

Fixes: 43a2751 ("Add support for Xen store API")
Signed-off-by: Koichiro Den <den@valinux.co.jp>
@lkpdn

lkpdn commented Aug 27, 2026

Copy link
Copy Markdown
Author

Sorry for the repeated force-pushes. I've just included the coverage update. PTAL, thanks!

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.

1 participant