public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: <rsbecker@nexbridge•com>
To: "'Junio C Hamano'" <gitster@pobox•com>,
	"'Randall S. Becker'" <the.n.e.key@gmail•com>
Cc: <git@vger•kernel.org>
Subject: RE: [PATCH v1 4/4] builtin/unpack-objects.c: change xwrite to write_in_full to allow large sizes.
Date: Mon, 26 Feb 2024 19:18:40 -0500	[thread overview]
Message-ID: <027201da6912$872779d0$95766d70$@nexbridge.com> (raw)
In-Reply-To: <xmqqr0gyixuu.fsf@gitster.g>

On Monday, February 26, 2024 6:56 PM, Junio C Hamano wrote:
>"Randall S. Becker" <the.n.e.key@gmail•com> writes:
>
>> From: "Randall S. Becker" <rsbecker@nexbridge•com>
>>
>> This change is required because some platforms do not support file
>> writes of arbitrary sizes (e.g, NonStop). xwrite ends up truncating
>> the output to the maximum single I/O size possible for the destination
device.
>>
>> Signed-off-by: Randall S. Becker <rsbecker@nexbridge•com>
>> ---
>>  builtin/unpack-objects.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
>The same comment as [1/4].  Perhaps your MAX_IO_SIZE should be tuned
downwards, so that xwrite() works as it was designed to
>work.

I am considering undoing this one, other than ensuring that the error code
is checked and returned. The MAX_IO_SIZE is sufficient. I think the actual
fail was in the original repack.c not this one.

>
>> diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index
>> e0a701f2b3..6935c4574e 100644
>> --- a/builtin/unpack-objects.c
>> +++ b/builtin/unpack-objects.c
>> @@ -680,7 +680,7 @@ int cmd_unpack_objects(int argc, const char
>> **argv, const char *prefix UNUSED)
>>
>>  	/* Write the last part of the buffer to stdout */
>>  	while (len) {
>> -		int ret = xwrite(1, buffer + offset, len);
>> +		int ret = write_in_full(1, buffer + offset, len);
>>  		if (ret <= 0)
>>  			break;
>>  		len -= ret;


      reply	other threads:[~2024-02-27  0:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 22:05 [PATCH v1 0/4] Change xwrite() to write_in_full() in builtins Randall S. Becker
2024-02-26 22:05 ` [PATCH v1 1/4] builtin/index-pack.c: change xwrite to write_in_full to allow large sizes Randall S. Becker
2024-02-26 22:38   ` Taylor Blau
2024-02-26 22:51     ` rsbecker
2024-02-26 23:46       ` Junio C Hamano
2024-02-27  0:12         ` rsbecker
2024-02-26 23:30     ` rsbecker
2024-02-26 22:05 ` [PATCH v1 2/4] builtin/receive-pack.c: " Randall S. Becker
2024-02-26 23:02   ` rsbecker
2024-02-26 23:50   ` Junio C Hamano
2024-02-27  0:15     ` rsbecker
2024-02-26 22:05 ` [PATCH v1 3/4] builtin/repack.c: " Randall S. Becker
2024-02-26 23:54   ` Junio C Hamano
2024-02-27  8:20   ` Jeff King
2024-02-27  8:22     ` Jeff King
2024-02-26 22:05 ` [PATCH v1 4/4] builtin/unpack-objects.c: " Randall S. Becker
2024-02-26 23:56   ` Junio C Hamano
2024-02-27  0:18     ` rsbecker [this message]

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='027201da6912$872779d0$95766d70$@nexbridge.com' \
    --to=rsbecker@nexbridge$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=the.n.e.key@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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