async fn unshare(&self) -> Result<Self::Output, Self::Error> {
        match self.shared() {
            Some(Protocol::Nvmf) => {
                if let Some(subsystem) = NvmfSubsystem::nqn_lookup(&self.name())
                {
                    subsystem.stop().await.context(UnshareNvmf {})?;
                    subsystem.destroy();
                }
            }
            Some(Protocol::Iscsi) => {
                iscsi::unshare(&self.name())
                    .await
                    .context(UnshareIscsi {})?;
            }
            Some(Protocol::Off) | None => {}
        }

        Ok(self.name())
    }
/// unshare the bdev regardless of current active share
unshare the bdev regardless of current active share
unshare the bdev regardless of current active share
async fn unshare(&self) -> Result<Self::Output, Self::Error> {
        match self.shared() {
            Some(Protocol::Nvmf) => {
                if let Some(subsystem) = NvmfSubsystem::nqn_lookup(&self.name())
                {
                    subsystem.stop().await.context(UnshareNvmf {})?;
                    subsystem.destroy();
                }
            }
            Some(Protocol::Iscsi) => {
                iscsi::unshare(&self.name())
                    .await
                    .context(UnshareIscsi {})?;
            }
            Some(Protocol::Off) | None => {}
        }
        Ok(self.name())
    }
async fn unshare ( & self ) -> Result < Self :: Output , Self :: Error > { match self . shared ( ) { Some ( Protocol :: Nvmf ) => { if let Some ( subsystem ) = NvmfSubsystem :: nqn_lookup ( & self . name ( ) ) { subsystem . stop ( ) . await . context ( UnshareNvmf { } ) ? ; subsystem . destroy ( ) ; } } Some ( Protocol :: Iscsi ) => { iscsi :: unshare ( & self . name ( ) ) . await . context ( UnshareIscsi { } ) ? ; } Some ( Protocol :: Off ) | None => { } } Ok ( self . name ( ) ) }
unshare the bdev regardless of current active share
unshare the bdev regardless of current active share
&self