From: Nick Hengeveld <nickh@reactrix.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/3] Support for partial HTTP transfers
Date: Tue, 27 Sep 2005 08:36:36 -0700 [thread overview]
Message-ID: <20050927153636.GA1377@reactrix.com> (raw)
In-Reply-To: <7vfyrr3vwp.fsf@assigned-by-dhcp.cox.net>
On Mon, Sep 26, 2005 at 10:46:30PM -0700, Junio C Hamano wrote:
> I think (O_CREAT|O_EXCL) in your code can be easily defeated by
> this sequence:
>
> one two
>
> unlink prevfile
> rename tmpfile, prevfile
> unlink tmpfile
> local = open tmpfile
> unlink prevfile
> rename tmpfile, prevfile
> unlink tmpfile
> local = open tmpfile
> prevlocal = open prevfile
> write local
> copyfile prevlocal, local
> write local
> ???
The way I understand this sequence, one and two will not be writing to
the same file. When two unlinks tmpfile, one will still be able to
write to its local, but the body of the file that one is writing will
be removed when it closes local.
> Not that I think the multiple instances should be prevented at
> this low level --- if they stomp on each other at this level, it
> is very likely the they are doing duplicated work on the network
> side as well, and should be prevented from doing so at much
> higher level than this, I think. That's why I said I do not
> mind BKL upfront in git-fetch.sh.
True, is that something I should include with the partial patch?
--
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.
next prev parent reply other threads:[~2005-09-27 15:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-26 17:52 [PATCH 2/3] Support for partial HTTP transfers Nick Hengeveld
2005-09-26 21:19 ` Junio C Hamano
2005-09-27 0:09 ` Nick Hengeveld
2005-09-27 5:46 ` Junio C Hamano
2005-09-27 15:36 ` Nick Hengeveld [this message]
2005-09-27 17:09 ` Junio C Hamano
2005-09-27 17:19 ` Nick Hengeveld
2005-09-27 22:24 ` Junio C Hamano
2005-09-26 22:23 ` Daniel Barkalow
2005-09-27 10:35 ` sf
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=20050927153636.GA1377@reactrix.com \
--to=nickh@reactrix.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).