fn mount(&self, cmd: FsBackendMountCmd) -> DaemonResult<()> {
        if self.backend_from_mountpoint(&cmd.mountpoint)?.is_some() {
            return Err(DaemonError::AlreadyExists);
        }
        let backend = fs_backend_factory(&cmd)?;
        let index = self.get_vfs().mount(backend, &cmd.mountpoint)?;
        info!("{} mounted at {}", &cmd.fs_type, &cmd.mountpoint);
        self.backend_collection().add(&cmd.mountpoint, &cmd)?;

        // Add mounts opaque to UpgradeManager
        if let Some(mut mgr_guard) = self.upgrade_mgr() {
            upgrade::add_mounts_state(&mut mgr_guard, cmd, index)?;
        }

        Ok(())
    }
// NOTE: This method is not thread-safe, however, it is acceptable as
// mount/umount/remount/restore_mount is invoked from single thread in FSM
This method is not thread-safe, however, it is acceptable as
mount/umount/remount/restore_mount is invoked from single thread in FSM
This method is not thread - safe however it is acceptable as mount / umount / remount / restore_mount is invoked from single thread in FSM
fn mount(&self, cmd: FsBackendMountCmd) -> DaemonResult<()> {
        if self.backend_from_mountpoint(&cmd.mountpoint)?.is_some() {
            return Err(DaemonError::AlreadyExists);
        }
        let backend = fs_backend_factory(&cmd)?;
        let index = self.get_vfs().mount(backend, &cmd.mountpoint)?;
        info!("{} mounted at {}", &cmd.fs_type, &cmd.mountpoint);
        self.backend_collection().add(&cmd.mountpoint, &cmd)?;
        // Add mounts opaque to UpgradeManager
        if let Some(mut mgr_guard) = self.upgrade_mgr() {
            upgrade::add_mounts_state(&mut mgr_guard, cmd, index)?;
        }
        Ok(())
    }
fn mount ( & self , cmd : FsBackendMountCmd ) -> DaemonResult < ( ) > { if self . backend_from_mountpoint ( & cmd . mountpoint ) ? . is_some ( ) { return Err ( DaemonError :: AlreadyExists ) ; } let backend = fs_backend_factory ( & cmd ) ? ; let index = self . get_vfs ( ) . mount ( backend , & cmd . mountpoint ) ? ; info ! ( " " cmd fs_type cmd mountpoint ) ; self . backend_collection ( ) . add ( & cmd . mountpoint , & cmd ) ? ; // Add mounts opaque to UpgradeManager if let Some ( mut mgr_guard ) = self . upgrade_mgr ( ) { upgrade :: add_mounts_state ( & mut mgr_guard , cmd , index ) ? ; } Ok ( ( ) ) }
NOTE: This method is not thread-safe, however, it is acceptable as
mount/umount/remount/restore_mount is invoked from single thread in FSM
NOTE : This method is not thread - safe however it is acceptable as mount / umount / remount / restore_mount is invoked from single thread in FSM
&self
cmd
FsBackendMountCmd
&self
cmd
FsBackendMountCmd