'Detaches the storage adapters from the disk.
:param instance: instance from which to detach the image.
:return: A list of all the backing storage elements that were detached
from the I/O Server and VM.'

def detach_disk(self, instance):

    stg_ftsk = tsk_par.build_active_vio_feed_task(self._adapter, name='ssp', xag=[pvm_const.XAG.VIO_SMAP])
    lpar_uuid = vm.get_pvm_uuid(instance)
    match_func = tsk_map.gen_match_func(pvm_stg.LU)
    def rm_func(vwrap):
        LOG.info('Removing    SSP    disk    connection    to    VIOS    %s.', vwrap.name, instance=instance)
        return tsk_map.remove_maps(vwrap, lpar_uuid, match_func=match_func)
    lu_set = set()
    for vios_uuid in self._vios_uuids:
        stg_ftsk.wrapper_tasks[vios_uuid].add_functor_subtask(rm_func)
        vios_w = stg_ftsk.wrapper_tasks[vios_uuid].wrapper
        mappings = tsk_map.find_maps(vios_w.scsi_mappings, client_lpar_id=lpar_uuid, match_func=match_func)
        if mappings:
            lu_set.update([x.backing_storage for x in mappings])
    stg_ftsk.execute()
    return list(lu_set)
