anchor.diff:  get_next_stage(wait_for_dbsync) -> clean_database;
   get_next_stage(clean_database) -> finished.
   
  -execute_stage(init, SpaceId, StorageId) ->
  +execute_stage(#state{current_stage = init} = State, SpaceId, StorageId) ->
       % fixme inform zone space unsupported
       % fixme start blockades
       % fixme stop all incoming transfers
       % fixme kill handles
  -    % fixme mozna zrownoleglić (+ qos)
  -    next_stage(SpaceId, StorageId);
  -execute_stage(qos, SpaceId, StorageId) ->
  +    % fixme mozna zrownoleglić (+ qos) -> uzyc traversu 
  +    next_stage(SpaceId, StorageId),
  +    State;
  +execute_stage(#state{current_stage = qos} = State, SpaceId, StorageId) ->
       SpaceGuid = fslogic_uuid:spaceid_to_space_dir_guid(SpaceId),
       % fixme if preferred provider replace AllStorages with provider Id (not really if other providers still allowed)
       Expression = <<?ALL_STORAGES/binary, " - storage_id = ", StorageId/binary>>,
  -    % fixme internal qos (pid to inform? (what if dead - callback))
  -    {ok, QosEntryId} = lfm:add_qos_entry(?ROOT_SESS_ID, {guid, SpaceGuid}, Expression, 1),
  +    {ok, QosEntryId} = lfm:add_qos_entry(?ROOT_SESS_ID, {guid, SpaceGuid}, Expression, 1, ?MODULE),
       ?notice("QosEntry: ~p", [QosEntryId]),
  -    % fixme use qos status sub
       spawn(fun() -> wait_for_qos(QosEntryId, SpaceId, StorageId) end),
  -    ok;
  -execute_stage(clear_storage, SpaceId, StorageId) ->
  -    % fixme remove file_location ()
  +    State#state{id = QosEntryId};
  +execute_stage(#state{current_stage = clear_storage} = State, SpaceId, StorageId) ->
       % fixme do not clean storage if import is on
       {ok, TaskId} = unsupport_traverse:start(SpaceId, StorageId),
       ?notice("TaskId: ~p", [TaskId]),
       % fixme delete space root dir
  -    ok;
  -execute_stage(wait_for_dbsync, SpaceId, StorageId) ->
  +    State#state{id = TaskId};
  +execute_stage(#state{current_stage = wait_for_dbsync} = State, SpaceId, StorageId) ->
       % fixme
       % fixme wait for all docs to be saved on disc
  -    timer:sleep(timer:seconds(15)),
  +    timer:sleep(timer:seconds(60)),
       % fixme stop dbsync
  -    next_stage(SpaceId, StorageId);
  -execute_stage(clean_database, SpaceId, StorageId) ->
  -    % fixme do it first (inform zone, that space is being unsupported)
  +    next_stage(SpaceId, StorageId),
  +    State;
  +execute_stage(#state{current_stage = clean_database} = State, SpaceId, StorageId) ->
  +    % fixme do it in init (inform zone, that space is being unsupported)
       storage_logic:revoke_space_support(StorageId, SpaceId),
       xd(SpaceId, StorageId),
       % fixme find which local documents are to be deleted and to it here (storage:space_unsupported?), space_quota
  
positive.code: 
  debug() ->
      gen_server2:cast(?SERVER, debug).
  
  %%%===================================================================
  %%% Spawning and gen_server implementation
  
negative.code: 
  % fixme
  -record(state, {
      current_stage :: space_unsupport:stage(),
      id :: qos_entry:id() | traverse:id()
      % fixme is canceling
  }).
  
  