git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Prevent git from rehashing 4GBi files

From
Junio C Hamano <gitster@pobox.com>
Date
May 6, 2022, 21:23 UTC
Message-ID
<xmqq8rrejqy6.fsf@gitster.g>
In-Reply-To
<dd2ffc74-af7e-c2fb-8466-f16e419c39d6@iee.email>
Philip Oakley <philipoakley@iee.email> writes:
Show 8 quoted lines
>> This may treat non-zero multiple of 4GiB as "not racy", but has
>> anybody double checked the concern Réne brought up earlier that a
>> 4GiB file that was added and then got rewritten to 2GiB within the
>> same second would suddenly start getting treated as not racy?
> This is the pre-existing problem, that ~1in 2^31 size changes might not
> get noticed for size change. The 0 byte / 4GiB change is an identical
> issue, as is changing from 3 bytes to 4GiB+3 bytes, etc., so that's no
> worse than before (well maybe twice as 'unlikely').
OK, it added one more case to 2^32-1 existing cases, I guess.
>> The patch (the firnal version of it anyway) needs to be accompanied
>> by a handful of test additions to tickle corner cases like that.
> They'd be protected by the EXPENSIVE prerequisite I would assume.
Oh, absolutely.  Thanks for spelling that out.
Previous: Philip Oakley
Message 6 of 6 in “Prevent git from rehashing 4GBi files”
  1. Prevent git from rehashing 4GBi filesJason Hatton, May 6, 2022
  2. Torsten BögershausenMay 6, 2022
  3. Philip OakleyMay 6, 2022
  4. Junio C HamanoMay 6, 2022
  5. Philip OakleyMay 6, 2022
  6. Junio C HamanoMay 6, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.