anchor.diff:      fslogic_file:fix_storage_owner(FileDoc),
   
       {ok, UserDoc} = fslogic_objects:get_user(),
  -    ok = fslogic_perms:check_file_perms(FullFileName,UserDoc,FileDoc,list_to_existing_atom(OpenMode)),
  +    ok = fslogic_perms:check_file_perms(FullFileName, UserDoc, FileDoc, list_to_existing_atom(OpenMode)),
   
       % cache all permissions
       case FileDoc#db_document.record#file.perms of
  -        Mask when (Mask band (?RWE_USR_PERM bor ?RWE_GRP_PERM bor ?RWE_OTH_PERM)) == 0  ->
  -            fslogic_perms:check_file_perms(FullFileName,UserDoc,FileDoc,rdwr),
  -            fslogic_perms:check_file_perms(FullFileName,UserDoc,FileDoc,execute),
  -            fslogic_perms:check_file_perms(FullFileName,UserDoc,FileDoc,delete);
  +        Mask when (Mask band (?RWE_USR_PERM bor ?RWE_GRP_PERM bor ?RWE_OTH_PERM)) == 0 ->
  +            fslogic_perms:check_file_perms(FullFileName, UserDoc, FileDoc, rdwr),
  +            fslogic_perms:check_file_perms(FullFileName, UserDoc, FileDoc, execute),
  +            fslogic_perms:check_file_perms(FullFileName, UserDoc, FileDoc, delete);
           _ -> ok
       end,
   
  -    {ok,_} = fslogic_objects:save_file_descriptor(fslogic_context:get_protocol_version(), FileDoc#db_document.uuid, fslogic_context:get_fuse_id(), Validity),
  +    {ok, _} = fslogic_objects:save_file_descriptor(fslogic_context:get_protocol_version(), FileDoc#db_document.uuid, fslogic_context:get_fuse_id(), Validity),
   
       #db_document{record = FileLoc} = FileLocDoc = fslogic_file:get_file_local_location_doc(FileDoc),
   
  
positive.code: %% to clients currently using the file. Returns the number of push messages sent.
  %% @end
  -spec register_file_block(FullFileName :: string(), Offset :: non_neg_integer(),
                            Size :: non_neg_integer()) -> {ok, non_neg_integer()}.
  %% ====================================================================
  register_file_block(FullFileName, Offset, Size) ->
      {ok, #db_document{} = FileDoc} = fslogic_objects:get_file(FullFileName),
      Location = fslogic_file:get_file_local_location(FileDoc),
      #file_location{storage_uuid = StorageUUID} = Location,
  
negative.code: 
  %% API
  -export([get_file_location/2, get_file_location/3, get_new_file_location/3,
      register_file_block/3, update_file_block_map/2, create_file_ack/1,
      file_not_used/1, renew_file_location/1]).
  
  %% ====================================================================
  %% API functions
  