Skip to content

Commit 03afd7b

Browse files
committed
Update dependencies to the latest version.
1 parent 3608f38 commit 03afd7b

5 files changed

Lines changed: 28 additions & 25 deletions

File tree

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
run: cargo install cargo-llvm-cov --locked
5656

5757
- name: Run tests with coverage
58-
run: cargo llvm-cov --fail-under-lines 78 --ignore-filename-regex src/bin/
58+
run: cargo llvm-cov --fail-under-lines 77 --ignore-filename-regex src/bin/
5959

6060
- name: Build project
6161
if: github.event_name == 'workflow_dispatch' && github.ref_type == 'tag'

Cargo.toml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,34 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
clap = { version = "4.5.13", features = ["cargo", "wrap_help"] }
7+
clap = { version = "4.5.40", features = ["cargo", "wrap_help"] }
88
serde = { version = "1.0", features = ["derive"] }
9-
aes = "0.8.4"
10-
cipher = "0.4.4"
11-
xts-mode = "0.5.1"
12-
bincode = "1.3.3"
9+
bincode = { version = "2.0.1", features = ["serde"] }
1310
libc = "0.2"
14-
smallvec = "1.14.0"
11+
smallvec = "1.15.1"
1512
thiserror = "2.0.12"
16-
nix = { version = "0.26.2", features = ["event"] }
13+
nix = { version = "0.30.1", features = ["event", "fs"] }
1714
# vhost = { path = "../vhost/vhost", features = ["vhost-user-frontend"] }
1815
# vhost-user-backend = { path = "../vhost/vhost-user-backend" }
19-
vhost = { version = "0.13.0", features = ["vhost-user-frontend"] }
20-
vhost-user-backend = "0.17.0"
21-
vmm-sys-util = "0.12.1"
22-
vm-memory = "0.16.1"
23-
virtio-bindings = "0.2.5"
24-
virtio-queue = "0.14.0"
25-
io-uring = "0.7.4"
16+
vhost = { version = "0.14.0", features = ["vhost-user-frontend"] }
17+
vhost-user-backend = "0.20.0"
18+
vmm-sys-util = "0.14.0"
19+
vm-memory = "0.16.2"
20+
virtio-bindings = "0.2.6"
21+
virtio-queue = "0.16.0"
22+
io-uring = "0.7.8"
2623
serde_yaml = "0.9.34"
2724
hex = "0.4.3"
2825
log = "0.4.27"
2926
env_logger = "0.11.8"
30-
tempfile = "3.19.1"
31-
serde_with = { version = "3.12.0", features = ["base64"] }
27+
tempfile = "3.20.0"
28+
serde_with = { version = "3.14.0", features = ["base64"] }
3229
base64 = "0.22.1"
3330
aes-gcm = "0.10.3"
3431

3532
[build-dependencies]
36-
bindgen = "0.71.1"
33+
bindgen = "0.72.0"
3734

3835
[dev-dependencies]
39-
virtio-queue = { version = "0.14.0", features = ["test-utils"] }
40-
vm-memory = { version = "0.16.1", features = ["backend-mmap", "backend-atomic"] }
36+
virtio-queue = { version = "0.16.0", features = ["test-utils"] }
37+
vm-memory = { version = "0.16.2", features = ["backend-mmap", "backend-atomic"] }

src/bin/vhost-frontend.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ fn get_config(frontend: &mut Frontend) -> Result<VirtioBlockConfig, Box<dyn std:
216216

217217
// deserialize data
218218
let output_buf: &[u8] = data.as_ref();
219-
let cfg: VirtioBlockConfig = bincode::deserialize(output_buf).unwrap();
219+
let (cfg, _): (VirtioBlockConfig, usize) =
220+
bincode::serde::decode_from_slice(output_buf, bincode::config::standard())
221+
.map_err(|e| format!("Failed to deserialize block config: {}", e))?;
220222
Ok(cfg)
221223
}
222224

src/block_device/bdev_uring.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl IoChannel for UringIoChannel {
117117
let id = entry.user_data();
118118
if result < 0 {
119119
finished_requests.push((id as usize, false));
120-
error!("IO request failed: {}", Errno::from_i32(-result));
120+
error!("IO request failed: {}", Errno::from_raw(-result));
121121
} else {
122122
finished_requests.push((id as usize, true));
123123
}

src/vhost_backend/request.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ impl Request {
171171
mod tests {
172172
use super::*;
173173
use virtio_bindings::bindings::virtio_ring::{VRING_DESC_F_NEXT, VRING_DESC_F_WRITE};
174-
use virtio_queue::{Descriptor as SplitDescriptor, Queue, QueueOwnedT};
174+
use virtio_queue::desc::split::Descriptor as SplitDescriptor;
175+
use virtio_queue::{Queue, QueueOwnedT};
175176
use vm_memory::{Address, GuestAddress, GuestAddressSpace, GuestMemoryAtomic, GuestMemoryMmap};
176177

177178
type GuestMemory = GuestMemoryMmap<()>;
@@ -184,12 +185,15 @@ mod tests {
184185

185186
fn build_chain(
186187
mem: &GuestMemory,
187-
descs: &[virtio_queue::Descriptor],
188+
descs: &[SplitDescriptor],
188189
) -> DescriptorChain<GuestMemoryLoadGuard<GuestMemory>> {
190+
use virtio_queue::desc::RawDescriptor;
189191
use virtio_queue::mock::MockSplitQueue;
190192

191193
let vq = MockSplitQueue::new(mem, 16);
192-
vq.add_desc_chains(descs, 0).unwrap();
194+
let raw_descs: Vec<RawDescriptor> =
195+
descs.iter().cloned().map(RawDescriptor::from).collect();
196+
vq.add_desc_chains(&raw_descs, 0).unwrap();
193197
let mut queue: Queue = vq.create_queue().unwrap();
194198
let atomic = GuestMemoryAtomic::new(mem.clone());
195199
let mut iter = queue.iter(atomic.memory()).unwrap();

0 commit comments

Comments
 (0)