/// Undo export of a bdev over iscsi done above.
Undo export of a bdev over iscsi done above.
Undo export of a bdev over iscsi done above .
pub async fn unshare(bdev_name: &str) -> Result<()> {
    let (sender, receiver) = oneshot::channel::<ErrnoResult<()>>();
    let iqn = target_name(bdev_name);
    let c_iqn = CString::new(iqn.clone()).unwrap();
    info!("Destroying iscsi target {}", iqn);
    unsafe {
        spdk_iscsi_shutdown_tgt_node_by_name(
            c_iqn.as_ptr(),
            Some(done_errno_cb),
            cb_arg(sender),
        );
    }
    receiver
        .await
        .expect("Cancellation is not supported")
        .context(DestroyTarget {})?;
    info!("Destroyed iscsi target {}", bdev_name);
    Ok(())
}
pub async fn unshare ( bdev_name : & str ) -> Result < ( ) > { let ( sender , receiver ) = oneshot :: channel :: < ErrnoResult < ( ) > > ( ) ; let iqn = target_name ( bdev_name ) ; let c_iqn = CString :: new ( iqn . clone ( ) ) . unwrap ( ) ; info ! ( " " iqn ) ; unsafe { spdk_iscsi_shutdown_tgt_node_by_name ( c_iqn . as_ptr ( ) , Some ( done_errno_cb ) , cb_arg ( sender ) , ) ; } receiver . await . expect ( " " ) . context ( DestroyTarget { } ) ? ; info ! ( " " bdev_name ) ; Ok ( ( ) ) }
Undo export of a bdev over iscsi done above.
Undo export of a bdev over iscsi done above .
bdev_name
&str