'Unlink a target volume from its source volume.
:param array: the array serial number
:param source_device_id: the source device id
:param target_device_id: the target device id
:param snap_name: the snap name
:param extra_specs: extra specifications
:return: return code'

def _unlink_volume(self, array, source_device_id, target_device_id, snap_name, extra_specs):

    def _unlink_vol():
        'Called    at    an    interval    until    the    synchronization    is    finished.\n\n                                                :raises:    loopingcall.LoopingCallDone\n                                                '
        retries = kwargs['retries']
        try:
            kwargs['retries'] = (retries + 1)
            if (not kwargs['modify_vol_success']):
                self.rest.modify_volume_snap(array, source_device_id, target_device_id, snap_name, extra_specs, unlink=True)
                kwargs['modify_vol_success'] = True
        except exception.VolumeBackendAPIException:
            pass
        if (kwargs['retries'] > UNLINK_RETRIES):
            LOG.error('_unlink_volume    failed    after    %(retries)d    tries.', {'retries': retries})
            raise loopingcall.LoopingCallDone(retvalue=30)
        if kwargs['modify_vol_success']:
            raise loopingcall.LoopingCallDone()
    kwargs = {'retries': 0, 'modify_vol_success': False}
    timer = loopingcall.FixedIntervalLoopingCall(_unlink_vol)
    rc = timer.start(interval=UNLINK_INTERVAL).wait()
    return rc
