Files
cloud-hypervisor/src/bin/vhost_user_blk.rs
Yang Zhong 99da1dff90 vhost-user-blk: Add MQ support in backend
Adding the num_queues parameter for vhost-user-blk backend, which
can enable MQ support in the backend.

This patch has enabled the MQ support from handle_event, and the
vhost-user-backend crate will enable multiple threads to call this
handle_event to handle read/write operations.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
2020-02-03 09:49:27 +01:00

39 lines
1.2 KiB
Rust

// Copyright 2019 Red Hat, Inc. All Rights Reserved.
//
// Portions Copyright 2019 Intel Corporation. All Rights Reserved.
//
// Portions Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Portions Copyright 2017 The Chromium OS Authors. All rights reserved.
//
// SPDX-License-Identifier: (Apache-2.0 AND BSD-3-Clause)
#[macro_use(crate_version, crate_authors)]
extern crate clap;
extern crate vhost_user_block;
use clap::{App, Arg};
use vhost_user_block::start_block_backend;
fn main() {
let cmd_arguments = App::new("vhost-user-blk backend")
.version(crate_version!())
.author(crate_authors!())
.about("Launch a vhost-user-blk backend.")
.arg(
Arg::with_name("block-backend")
.long("block-backend")
.help(
"vhost-user-block backend parameters \"image=<image_path>,\
sock=<socket_path>,num_queues=<number_of_queues>,\
readonly=true|false,direct=true|false\"",
)
.takes_value(true)
.min_values(1),
)
.get_matches();
let backend_command = cmd_arguments.value_of("block-backend").unwrap();
start_block_backend(backend_command);
}