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

Re: [PATCH 2/2] reftable/stack: fix race in up-to-date check

From
Jeff King <peff@peff.net>
Date
Jan 20, 2024, 01:05 UTC
Message-ID
<20240120010559.GE117170@coredump.intra.peff.net>
In-Reply-To
<713e51a25c1c4cfa830db97f71cd7c39e85864d4.1705585037.git.ps@pks.im>
On Thu, Jan 18, 2024 at 02:41:56PM +0100, Patrick Steinhardt wrote:
Show 7 quoted lines
> Refactor the code to stop using `stat_validity_check()`. Instead, we
> manually stat(3P) the file descriptors to make relevant information
> available. On Windows and MSYS2 the result will have both `st_dev` and
> `st_ino` set to 0, which allows us to address the first issue by not
> using the stat-based cache in that case. It also allows us to make sure
> that we always compare `st_dev` and `st_ino`, addressing the second
> issue.

I didn't think too hard about the details, but does this mean that every user of stat_validity_check() has the same issue? The other big one is packed-refs (for which the code was originally written). Should this fix go into that API?

-Peff
Previous: Junio C HamanoNext: Patrick Steinhardt
Message 5 of 7 in “reftable/stack: fix race in up-to-date check”
  1. 0/2 reftable/stack: fix race in up-to-date checkPatrick Steinhardt, Jan 18, 2024
  2. 1/2 reftable/stack: unconditionally reload stack after commitPatrick Steinhardt, Jan 18, 2024
  3. 2/2 reftable/stack: fix race in up-to-date checkPatrick Steinhardt, Jan 18, 2024
  4. Junio C HamanoJan 18, 2024
  5. Jeff KingJan 20, 2024
  6. Patrick SteinhardtJan 22, 2024
  7. Jeff KingJan 23, 2024

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.