Thread (1 message) 1 message, 1 author, 2016-06-15

Re: tree corrupted on disk quota full

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:48

Linus Torvalds [off-list ref] writes:
I personally think write_in_full() is totally mis-designed. If you are 
ready to handle partial writes, you should use "xwrite()". If you're not 
ready to handle partial writes, you should either use "write_or_die()", 
_or_ you should expect a partial write to at least return an error code 
(which is how "write_buffer()" works).
But that's not how write_in_full() actually works. Write-in-full does not 
return an error for a partial write, it returns the partial size.

Which is idiotic. It makes the function pointless. Just use xwrite() for 
that.
I agree 100% with the above reasoning.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help