All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Mike Hommey <mh@glandium.org>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH 2/2] Use xmmap_gently instead of xmmap in use_pack
Date: Wed, 15 May 2019 23:34:22 -0400	[thread overview]
Message-ID: <20190516033422.GD4596@sigill.intra.peff.net> (raw)
In-Reply-To: <20190516003736.25544-2-mh@glandium.org>

On Thu, May 16, 2019 at 09:37:36AM +0900, Mike Hommey wrote:

> use_pack has its own error message on mmap error, but it can't be
> reached when using xmmap, which dies with its own error.

Makes sense. Amusingly this xmmap comes from c4712e4553 (Replace mmap
with xmmap, better handling MAP_FAILED., 2006-12-24), which specifically
moved everything to xmmap for its error handling, and dropped all of the
MAP_FAILED checks. But it forgot to remove this one.

So we could also go the other way, and just remove the unreachable
check. I do think the error from use_pack() is better though, so I like
the direction you went.

-Peff

  reply	other threads:[~2019-05-16  3:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15 10:56 Closing fds twice when using remote helpers Mike Hommey
2019-05-15 11:43 ` Ævar Arnfjörð Bjarmason
2019-05-15 17:59   ` Johannes Sixt
2019-05-15 22:08     ` Mike Hommey
2019-05-15 23:53       ` Jeff King
2019-05-16  0:48         ` Mike Hommey
2019-05-16  3:28           ` Jeff King
2019-05-16  8:35             ` Mike Hommey
2019-05-16 21:47               ` Jeff King
2019-05-16 22:02                 ` Mike Hommey
2019-05-16  0:31 ` Mike Hommey
2019-05-16  0:37   ` [PATCH 1/2] dup() the input fd for fast-import used for " Mike Hommey
2019-05-16  0:37     ` [PATCH 2/2] Use xmmap_gently instead of xmmap in use_pack Mike Hommey
2019-05-16  3:34       ` Jeff King [this message]
2019-05-16  3:28     ` [PATCH 1/2] dup() the input fd for fast-import used for remote helpers Jeff King

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=20190516033422.GD4596@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mh@glandium.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.