git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: Solaris cloning woes partly diagnosed
Date: Tue, 04 Apr 2006 11:21:23 -0700	[thread overview]
Message-ID: <4432B923.7040202@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0604021118210.3050@g5.osdl.org>

Linus Torvalds wrote:
> 
> One thing to do might be to make the itimer use a much higher frequency, 
> to trigger the problem more easily.
> 
> We do, for example, expect that regular file writing not do that. At least 
> "write_sha1_from_fd()" will just do a "write()" without testing the error 
> return, which is bad (it would silently create a truncated object if the 
> /tmp filesystem filled up). If somebody has their filesystem over NFS 
> mounted interruptible, partial writes could also happen.
> 

There seems to be a whole bunch of places where we use naked write()s 
where xwrite or fwrite would be a lot more appropriate.  The ssh-* files 
seem to be particularly offensive in that way.

There are also a number of places which call xwrite with the apparent 
belief that returning short is an error (e.g. blame.c).  This as far as 
I know the more common definition of xwrite(), but is *not* the one used 
in git -- the one in git only guarantees that at least one character is 
written.

	-hpa

  parent reply	other threads:[~2006-04-04 18:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-02 10:41 Solaris cloning woes partly diagnosed Junio C Hamano
2006-04-02 18:33 ` Linus Torvalds
2006-04-02 19:10   ` Jason Riedy
2006-04-02 19:22     ` Linus Torvalds
2006-04-02 19:18   ` Linus Torvalds
2006-04-02 19:52     ` Jason Riedy
2006-04-02 20:28       ` Linus Torvalds
2006-04-02 20:31         ` [PATCH 2/2] pack-objects: be incredibly anal about stdio semantics Linus Torvalds
2006-04-02 21:09           ` Junio C Hamano
2006-04-02 21:21             ` Linus Torvalds
2006-04-02 22:12               ` Jason Riedy
2006-04-02 22:58                 ` Linus Torvalds
2006-04-02 22:29         ` [PATCH] Use sigaction and SA_RESTART in read-tree.c; add option in Makefile Jason Riedy
2006-04-03  1:02           ` Linus Torvalds
2006-04-03  4:20           ` Junio C Hamano
2006-04-03  4:40             ` Linus Torvalds
2006-04-03  3:06     ` Solaris cloning woes partly diagnosed Linus Torvalds
2006-04-04 18:21   ` H. Peter Anvin [this message]
2006-04-04  8:47 ` [RFH] Solaris cloning woes Junio C Hamano
2006-04-04 18:53   ` Jason Riedy

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=4432B923.7040202@zytor.com \
    --to=hpa@zytor.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=torvalds@osdl.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 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).