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

Re: Solaris cloning woes partly diagnosed

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Apr 4, 2006, 18:21 UTC
Message-ID
<4432B923.7040202@zytor.com>
In-Reply-To
<Pine.LNX.4.64.0604021118210.3050@g5.osdl.org>
Linus Torvalds wrote:
Show 10 quoted lines
> 
> 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
Previous: Linus TorvaldsNext: Junio C Hamano
Message 18 of 20 in “Solaris cloning woes partly diagnosed”
  1. Junio C HamanoApr 2, 2006
  2. Linus TorvaldsApr 2, 2006
  3. Jason RiedyApr 2, 2006
  4. Linus TorvaldsApr 2, 2006
  5. Linus TorvaldsApr 2, 2006
  6. Jason RiedyApr 2, 2006
  7. Linus TorvaldsApr 2, 2006
  8. 2/2 pack-objects: be incredibly anal about stdio semanticsLinus Torvalds, Apr 2, 2006
  9. Junio C HamanoApr 2, 2006
  10. Linus TorvaldsApr 2, 2006
  11. Jason RiedyApr 2, 2006
  12. Linus TorvaldsApr 2, 2006
  13. Use sigaction and SA_RESTART in read-tree.c; add option in Makefile.Jason Riedy, Apr 2, 2006
  14. Linus TorvaldsApr 3, 2006
  15. Junio C HamanoApr 3, 2006
  16. Linus TorvaldsApr 3, 2006
  17. Linus TorvaldsApr 3, 2006
  18. H. Peter AnvinApr 4, 2006
  19. [RFH] Solaris cloning woes...Junio C Hamano, Apr 4, 2006
  20. Jason RiedyApr 4, 2006

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.