anchor.diff:  -spec apply_size_change_and_maybe_emit(SpaceId :: space_info:id(), SizeDiff :: integer()) ->
       ok | {error, Reason :: any()}.
   apply_size_change_and_maybe_emit(SpaceId, SizeDiff) ->
  -    Before = available_size(SpaceId),
  -    {ok, _} = apply_size_change(SpaceId, SizeDiff),
  -    After = available_size(SpaceId),
  +    Before = space_quota:available_size(SpaceId),
  +    {ok, _} = space_quota:apply_size_change(SpaceId, SizeDiff),
  +    After = space_quota:available_size(SpaceId),
       case Before * After =< 0 of
           true -> fslogic_event:emit_quota_exeeded();
           false -> ok
  
positive.code: assert_write(_SpaceId, WriteSize) when WriteSize =< 0 ->
      ok;
  assert_write(SpaceId, WriteSize) ->
      case available_size(SpaceId) >= WriteSize of
          true -> ok;
          false -> throw(?ENOSPC)
      end.
  
negative.code:     ok;
  soft_assert_write(SpaceId, WriteSize) ->
      {ok, SoftQuotaSize} = application:get_env(?APP_NAME, soft_quota_limit_size),
      case space_quota:available_size(SpaceId) + SoftQuotaSize >= WriteSize of
          true -> ok;
          false -> throw(?ENOSPC)
      end.
  