<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Network Cache: Deduplicate body data"
   href="https://bugs.webkit.org/show_bug.cgi?id=143652#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Network Cache: Deduplicate body data"
   href="https://bugs.webkit.org/show_bug.cgi?id=143652">bug 143652</a>
              from <span class="vcard"><a class="email" href="mailto:koivisto&#64;iki.fi" title="Antti Koivisto &lt;koivisto&#64;iki.fi&gt;"> <span class="fn">Antti Koivisto</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=143652#c4">comment #4</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=250632&amp;action=diff" name="attach_250632" title="patch">attachment 250632</a> <a href="attachment.cgi?id=250632&amp;action=edit" title="patch">[details]</a></span>
&gt; patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=250632&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=250632&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebKit2/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:155
&gt; &gt; +    return stat.st_nlink - 1;
&gt; 
&gt; Any danger of using more links to a single file than the file system
&gt; supports?</span >

Not really. On Apple platforms the limit seems to be 32767. If that fills then the link call will fail. We won't create new cache entries for that resource but it shouldn't be a problem otherwise.

<span class="quote">&gt; Don’t we have thread safety issues with the reference count of this data
&gt; member? I don’t understand the threading restrictions on this class. Maybe
&gt; the only function that is safe to call on another thread is
&gt; approximateSize()?</span >

It is ok as long as the ref count is not accessed from any other thread (and it isn't). Cache is currently a singleton so these s guaranteed to stay alive. But I'll switch to isolatedCopy() based scheme suggested by Anders which reads better.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>