nzr-virt: stay below hardcoded libvirt packet max
This commit is contained in:
parent
5040bc7b87
commit
24a0c1cc68
|
@ -17,7 +17,8 @@ pub struct Volume {
|
|||
impl Volume {
|
||||
/// Upload a disk image from libvirt in a blocking task
|
||||
async fn upload_img(from: impl Read + Send + 'static, to: Stream) -> Result<(), PoolError> {
|
||||
let mut reader = BufReader::with_capacity(4294967296, from);
|
||||
// 33554408 is current hardcoded VIR_NET_MESSAGE_PAYLOAD_MAX
|
||||
let mut reader = BufReader::with_capacity(33554407, from);
|
||||
|
||||
tokio::task::spawn_blocking(move || {
|
||||
loop {
|
||||
|
|
Loading…
Reference in a new issue