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

Re: [PATCH 2/2] Work around EMFILE when there are too many pack files

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 3, 2010, 17:06 UTC
Message-ID
<7vaalqxro0.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1288652061-19614-3-git-send-email-spearce@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 6 quoted lines
> @@ -876,7 +874,7 @@ static void prepare_packed_git_one(char *objdir, int local)
>  	sprintf(path, "%s/pack", objdir);
>  	len = strlen(path);
>  	dir = opendir(path);
> -	while (!dir && errno == EMFILE && unuse_one_window(packed_git, -1))
> +	while (!dir && errno == EMFILE && unuse_one_window(NULL, -1))
Hmmmm, why?
Show 6 quoted lines
> @@ -2314,7 +2325,7 @@ static int write_loose_object(const unsigned char *sha1, char *hdr, int hdrlen,
>  
>  	filename = sha1_file_name(sha1);
>  	fd = create_tmpfile(tmpfile, sizeof(tmpfile), filename);
> -	while (fd < 0 && errno == EMFILE && unuse_one_window(packed_git, -1))
> +	while (fd < 0 && errno == EMFILE && unuse_one_window(NULL, -1))
Again, why?
Previous: Johannes Sixt
Message 11 of 11 in “Work around too many file descriptors”
  1. 0/2 Work around too many file descriptorsShawn O. Pearce, Nov 1, 2010
  2. 1/2 Use git_open_noatime when accessing pack dataShawn O. Pearce, Nov 1, 2010
  3. Junio C HamanoNov 3, 2010
  4. Jonathan NiederNov 3, 2010
  5. Junio C HamanoNov 3, 2010
  6. Jonathan NiederNov 4, 2010
  7. Kevin BallardNov 4, 2010
  8. Junio C HamanoNov 5, 2010
  9. 2/2 Work around EMFILE when there are too many pack filesShawn O. Pearce, Nov 1, 2010
  10. Johannes SixtNov 2, 2010
  11. Junio C HamanoNov 3, 2010

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.