Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: <rsbecker@nexbridge.com>
Cc: "'Jeff King'" <peff@peff.net>,  <git@vger.kernel.org>,
	Patrick Steinhardt <ps@pks.im>
Subject: Re: Git 2.54.0-rc1, subtests of t5310, t5326, t5327
Date: Wed, 08 Apr 2026 14:43:20 -0700	[thread overview]
Message-ID: <xmqqcy09xh53.fsf@gitster.g> (raw)
In-Reply-To: <016b01dcc79e$87472860$95d57920$@nexbridge.com> (rsbecker@nexbridge.com's message of "Wed, 8 Apr 2026 17:27:34 -0400")

<rsbecker@nexbridge.com> writes:

> On April 8, 2026 4:22 PM, Junio C Hamano wrote:
>><rsbecker@nexbridge.com> writes:
>>
>>> On my box, I have the following note:
>>>
>>> Specifying  the sum of the iov_len values in the iov array greater
>>> than the OSS I/O size limit for that open causes the  writev()
>>> function  to return  -1  and  set errno to [EINVAL].
>>
>>That is unexpected.
>>
>>writev() may fail if the sum of iov_len would not fit within ssize_t with
> EINVAL, but
>>unless your "the OSS I/O size limit" is the same as SSIZE_MAX, what you
> have above
>>is not quite the same.
>>
>>Does your build work with NO_WRITEV=Nope?  I think I saw it asked a few
> times
>>but I do not recall seeing it answered.  At least we know
>>xwrite() seems to work well enough on your system, which is what the
>>writev() emulation is written in terms of, so I suspect it would.
>
> Yes, NO_WRITEV=Nope does compile and execute. I am including it
> in our CI/CD job for now. Can we plan on a fix for this?

What I have heard so far indicate that the code that uses writev()
would need to loop over to prepare for short writes, but your
writev() that fails for "the OSS I/O size limit" (whatever it is)
does not sound like something we want to change the callers to chomp
the writev() calls into smaller chunks for.  Such a platform is far
better off using the compat/writev for the code path we recently
started using writev() in.

To be quite honest, I am not sure if it is even worth using writev()
if we need a loop that protects against shrot writes, so unless I am
grossly mistaken (e.g., perhaps there is some guarantee that there
won't be any short writes for writev() that sends data smaller than
64k that I missed in the docs), the best course of action might be
to revert the change to use writev() and use the two write(2)s as
before, *if* we actually observe that the current code is broken by
short writes.


  reply	other threads:[~2026-04-08 21:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 23:29 Git 2.54.0-rc1, subtests of t5310, t5326, t5327 rsbecker
2026-04-08  4:17 ` Jeff King
2026-04-08 14:54   ` rsbecker
2026-04-08 16:25     ` rsbecker
2026-04-08 17:39       ` Jeff King
2026-04-08 18:12         ` Junio C Hamano
2026-04-08 20:08           ` rsbecker
2026-04-08 20:21             ` Junio C Hamano
2026-04-08 21:27               ` rsbecker
2026-04-08 21:43                 ` Junio C Hamano [this message]
2026-04-08 22:04                   ` rsbecker
2026-04-08 22:24                   ` Junio C Hamano
2026-04-08 22:35                     ` Junio C Hamano
2026-04-08 23:15                       ` rsbecker
2026-04-08 22:32                   ` Jeff King
2026-04-09  0:20                     ` brian m. carlson
2026-04-09  8:17                       ` Patrick Steinhardt
2026-04-09  9:48                         ` Phillip Wood
2026-04-09 11:29                           ` Patrick Steinhardt
2026-04-09 13:46                         ` rsbecker
2026-04-09 20:33                           ` Jeff King
2026-04-09 22:40                             ` rsbecker
2026-04-09 22:58                               ` Jeff King
2026-04-10  4:34                                 ` Patrick Steinhardt
2026-04-09 20:51                         ` Jeff King
2026-04-10  7:35                         ` Johannes Sixt
2026-04-08 18:36         ` rsbecker
2026-04-08 22:14           ` Jeff King
2026-04-08 17:37     ` Jeff King

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=xmqqcy09xh53.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=ps@pks.im \
    --cc=rsbecker@nexbridge.com \
    /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