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

Re: [PATCH 2/2] packfile: replace lseek+read with pread

From
EWEric Wong <e@80x24.org>
Date
Dec 26, 2019, 18:59 UTC
Message-ID
<20191226185932.GA19165@dcvr>
In-Reply-To
<xmqqzhffkku2.fsf@gitster-ct.c.googlers.com>
Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> Eric Wong <e@80x24.org> writes:
> >
> > Furthermore, readers of the packfile will be using mmap
> > (or pread to emulate mmap), anyways, so the file description
> > offset does not matter in this case.
> 
> s/description/descriptor/ probably.

No, I meant "description" :) The offset is shared in case of dup{,2,3} syscalls, which only creates a new descriptor, not a new description. Both the Linux and POSIX lseek(2) manpages say "description".

Previous: Junio C Hamano
Message 6 of 6 in “packfile: small syscall reductions”
  1. 0/2 packfile: small syscall reductionsEric Wong, Dec 26, 2019
  2. 1/2 packfile: remove redundant fcntl F_GETFD/F_SETFDEric Wong, Dec 26, 2019
  3. 2/2 packfile: replace lseek+read with preadEric Wong, Dec 26, 2019
  4. Junio C HamanoDec 26, 2019
  5. Junio C HamanoDec 26, 2019
  6. Eric WongDec 26, 2019

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.