From: Linus Torvalds <torvalds@linux-foundation.org>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: Robin Rosenberg <robin.rosenberg.lists@dewire.com>,
Michal Rokos <michal.rokos@gmail.com>, GIT <git@vger.kernel.org>
Subject: Re: index-pack died on pread
Date: Thu, 26 Jul 2007 09:13:36 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.999.0707260911040.3442@woody.linux-foundation.org> (raw)
In-Reply-To: <81b0412b0707260542o58fcb73bu81ae09aa1df84c81@mail.gmail.com>
On Thu, 26 Jul 2007, Alex Riesen wrote:
> >
> > It's true that pread() is used much less than normal reads, and maybe the
> > cygwin pread() is indeed broken. But it's intriguing how apparently both
> > HP-UX and Cygwin are showing the same breakage.
>
> Maybe because neither _has_ POSIX pread?
HP-UX? No pread()? It wouldn't link if it didn't have pread(). So it
clearly has pread(), it's just somehow broken.
And no, git doesn't need "POSIX pread". Look at what git does if you say
"NO_PREAD=1". It does a simple lseek/read pair instead.
> This is cygwin's pread, I believe:
>
> http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_disk_file.cc?rev=1.225&content-type=text/x-cvsweb-markup&cvsroot=src
I'm not saying that's great programming, but the "git_pread()" that git
will use in the absense of a real pread() is actually even *less* of a
POSIX pread, since it doesn't even try to save/restore the old position
(it knows that git doesn't care).
So I don't think that explains why git doesn't like cygwin's pread. I
suspect an earlier version of cygwin had an even more broken version of
pread at some point.
Linus
next prev parent reply other threads:[~2007-07-26 16:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-23 12:52 index-pack died on pread Michal Rokos
2007-07-23 15:32 ` Alex Riesen
2007-07-25 20:07 ` Michal Rokos
2007-07-25 20:48 ` Alex Riesen
2007-07-23 17:04 ` Linus Torvalds
2007-07-23 18:03 ` Nicolas Pitre
2007-07-25 23:15 ` Robin Rosenberg
2007-07-25 23:44 ` Linus Torvalds
2007-07-26 12:42 ` Alex Riesen
2007-07-26 16:13 ` Linus Torvalds [this message]
2007-07-26 16:51 ` Alex Riesen
2007-07-26 18:02 ` Linus Torvalds
2007-07-27 3:43 ` Junio C Hamano
2007-07-27 5:36 ` Linus Torvalds
2007-07-27 9:50 ` Tomash Brechko
2007-07-27 10:33 ` Tomash Brechko
2007-07-27 13:38 ` Nicolas Pitre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.0.999.0707260911040.3442@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=git@vger.kernel.org \
--cc=michal.rokos@gmail.com \
--cc=raa.lkml@gmail.com \
--cc=robin.rosenberg.lists@dewire.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).