Skip to content

Commit

Permalink
chore: add env variable to allow qpair async connect
Browse files Browse the repository at this point in the history
Add NVME_QPAIR_CONNECT_ASYNC env variable, which defaults to false;
If enabled then the qpair connection is async.
  • Loading branch information
tiagolobocastro committed Jun 8, 2022
1 parent b387dc6 commit 16c604a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions csi/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ impl node_server::Node for Node {
request: Request<NodeUnstageVolumeRequest>,
) -> Result<Response<NodeUnstageVolumeResponse>, Status> {
let msg = request.into_inner();
trace!("node_unstage_volume {:?}", msg);

if msg.volume_id.is_empty() {
return Err(failure!(
Expand Down
1 change: 1 addition & 0 deletions mayastor/src/bdev/nvmx/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ impl IoQpair {
opts.io_queue_requests =
max(opts.io_queue_requests, default_opts.io_queue_requests);
opts.create_only = true;
opts.async_mode = default_opts.async_mode;

opts
}
Expand Down
4 changes: 4 additions & 0 deletions mayastor/src/subsys/config/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ pub struct NvmeBdevOpts {
pub delay_cmd_submit: bool,
/// attempts per I/O in bdev layer before I/O fails
pub bdev_retry_count: i32,
/// enable creation of submission and completion queues asynchronously.
pub async_mode: bool,
}

impl GetOpts for NvmeBdevOpts {
Expand Down Expand Up @@ -284,6 +286,7 @@ impl Default for NvmeBdevOpts {
io_queue_requests: 0,
delay_cmd_submit: true,
bdev_retry_count: try_from_env("NVME_BDEV_RETRY_COUNT", 0),
async_mode: try_from_env("NVME_QPAIR_CONNECT_ASYNC", false),
}
}
}
Expand All @@ -305,6 +308,7 @@ impl From<spdk_bdev_nvme_opts> for NvmeBdevOpts {
io_queue_requests: o.io_queue_requests,
delay_cmd_submit: o.delay_cmd_submit,
bdev_retry_count: o.bdev_retry_count,
async_mode: NvmeBdevOpts::default().async_mode,
}
}
}
Expand Down
1 change: 1 addition & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ if [ -n "$UPLOAD" ] && [ -z "$SKIP_PUBLISH" ]; then
fi
if [ -n "$alias_tag" ]; then
for img in $UPLOAD; do
echo "Uploading $img:$alias_tag to registry ..."
$DOCKER tag $img:$TAG $img:$alias_tag
$DOCKER push $img:$alias_tag
done
Expand Down

0 comments on commit 16c604a

Please sign in to comment.